Set a reference field value from a script include

janindiadoc_1
Tera Expert

Hi,

 

Is there a way to set the sys id returned from script include in the reference qualifier for a reference variable?

 

I have a reference variable that refers to sys_user_group table. I'm calling a script include from the reference qualifier of this field as below.

javascript: new XXXutils().getGroups(current.variables.a,current.variables.b,current.variables.c);

 

The value returned from this is populated in the reference field dropdown, but not set in the field automatically.

I know this could be achieved by a client script, but just checking if there is a way in the reference qualifier itself to set the value in the variable to display it without selecting from the dropdown.

 

Thanks

 

1 ACCEPTED SOLUTION

Harish KM
Kilo Patron
Kilo Patron

Hi @janindiadoc_1 Reference Qualifiers are used to filter out data and they will not set to field automatically, it will just show under drop down, if you need to set it on field then use Client callable script include and onChange client script to set it on the field.

Regards
Harish

View solution in original post

5 REPLIES 5

Anil Nemmikanti
Giga Guru

Hi @janindiadoc_1 ,

Could you please try with default value where we can write JavaScript code, try to add ajax call in default value field.