How to populate field using advanced ref qualifier

Alon Grod
Tera Expert

Is there any way to call a script include using advanced ref qualifier and actually insert a value to the reference field and not just show the list of options using return. If I want to already set the value on the field using the advanced reference qualifier without using client script

 

8 REPLIES 8

Ravi Chandra_K
Kilo Patron
Kilo Patron

Hello @Alon Grod 

Then the best approach will be on change Client Script no? Any challenge with using Client script?

please mark the answer as helpful and correct iif it helped.

Kind Regards,

Ravi Chandra

@Ravi Chandra_K the goal is to use advanced ref qualifier and if certain conditions are met, then the advanced ref qualifier should insert the value into the field? is that possible?

seems like possible.

but there could be challenges like cross scope access issues.

refer the below thread:

https://www.servicenow.com/community/developer-forum/how-to-write-advanced-reference-qualifier-scrip...

https://www.servicenow.com/community/developer-forum/call-script-include-from-reference-qualifier/m-...

please mark the answer as helpful and correct if helped.

 

Kind Regards,

Ravi Chandra

@Ravi Chandra_K  but when you return sys_idIN someList it will return a list of values into the reference field and then the user will need to choose one of them. I want that if certain conditions are met then the script include will return one value that will be displayed on the form inside the field without asking from the user to choose a value. Is that possible? Instead of return sys_id IN then something like setValue or anything like that