Reference Qualifier or to pass list of records from client script to a Reference field

s_dinesh01
Tera Expert

Hi 

 

i have a reference field where it's qualifier should be based on 2 other fields on the form, when field A and field B is selected reference field should have the options related options  based A nd B.

 

i have written a script include which returns output of sys_ids which should be visible in reference field

i have written a onChange client script to call the script include and get the sys_ids

how can i pass those list of sys_id's into the reference field or how to use a reference qualifier with 2 input as params

 

Thanks

1 ACCEPTED SOLUTION

Brad Bowman
Kilo Patron
Kilo Patron

If you need the onChange script for something else that's fine, but for the qualifier you need to call the Script Include, passing in the two variables like this:

BradBowman_0-1726828086072.png

The function declaration in the Script Include then has the arguments (location, name) or whatever to use in the script.  The Script Include in this case needs to return 'sys_idIN' + <<comma-separated list of sys_ids>> -  which is usually accomplished by pushing the sys_ids to an array, then returning idArr.join(',')

 

View solution in original post

2 REPLIES 2

seethapathy
Giga Guru

hi @s_dinesh01 

You can use Field type as List to pass more sys_id if this is  helpful mark it as helpful

 

Brad Bowman
Kilo Patron
Kilo Patron

If you need the onChange script for something else that's fine, but for the qualifier you need to call the Script Include, passing in the two variables like this:

BradBowman_0-1726828086072.png

The function declaration in the Script Include then has the arguments (location, name) or whatever to use in the script.  The Script Include in this case needs to return 'sys_idIN' + <<comma-separated list of sys_ids>> -  which is usually accomplished by pushing the sys_ids to an array, then returning idArr.join(',')