How to auto populate a List Collector variable

Shravani Talaka
Tera Contributor

How to auto populate a List Collector variable (It is read only field as per requirement) which should populate based on another reference variable of same catalog item.

2 ACCEPTED SOLUTIONS

Brad Bowman
Kilo Patron
Kilo Patron

You can use g_form.setValue in a Client Script.  Set the value to a comma-separated list of sys_ids in the referenced table.  If that doesn't work there's a script to move certain values from the Available to the Selected box that I can dig up for you.

View solution in original post

You can supply a comma-separated list of email addresses instead of sys_ids.  Use the Variable attribute = glide_list to display the variable similar to a List type field instead of the Available/Selected boxes, then the list of email addresses corresponding to the selected records will be displayed in place of the display column for the referenced table.

BradBowman_0-1698068284935.png

BradBowman_1-1698068314115.png

 

View solution in original post

3 REPLIES 3

Brad Bowman
Kilo Patron
Kilo Patron

You can use g_form.setValue in a Client Script.  Set the value to a comma-separated list of sys_ids in the referenced table.  If that doesn't work there's a script to move certain values from the Available to the Selected box that I can dig up for you.

Shravani Talaka
Tera Contributor

Thanks for the response.

Auto population is working with a client script. But, It is showing up sys id's instead of emails.

You can supply a comma-separated list of email addresses instead of sys_ids.  Use the Variable attribute = glide_list to display the variable similar to a List type field instead of the Available/Selected boxes, then the list of email addresses corresponding to the selected records will be displayed in place of the display column for the referenced table.

BradBowman_0-1698068284935.png

BradBowman_1-1698068314115.png