Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Live fields in edit screen should work once the edit screen loads

G Krithica
Contributor
June 26, 2019

Hi,

I have configured a live field script to work on edit screen. It works fine for events like click , mouseover and all. The script should work once the edit screen loads.

I tried adding load event and it did not work. My script is to check for a field to be required based on other field. this works when i click or change value but when the form loads it is not working until an event occurs and am able to proceed with the submit button.

I know this can be done through behaviour script. I just want to know if this is possible in SIL Live fields.

Please let me know if this is possible.

Thanks,

Krithica

1 answer

0 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 27, 2019

Hello,

LIve fields do work on screen load. When you create a Live field you provide a sil script. You can put your code there and the code will work on loading a screen. If you want a script to work on a certain event then you define the lfWatch routine in the script.

G Krithica
Contributor
June 27, 2019

Without if watch routine the script is not working.

Below is my script

if( argv["screen"] == "edit") {
if((argv["customfield_A"] == "Value") &&((argv["customfield_B"] != "Yes" && argv["customfield_B"] != "No"))){

{
lfShowFieldMessage("customfield_B", "Field is required", "ERROR");
lfDisable("editSubmit");
}
}
else{
lfHideFieldMessage("customfield_B");
lfEnable("editSubmit");

}

}

In the Live fields configuration i gave this directly and it did not work. It works only if i add a mainscript with ifwatch routine.

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 27, 2019

Your script will not work because you use argv["customfield_B"]

You should query values as if it is a post function: customfield_b

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events