
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2020 09:16 AM
I have a record producer with a list collecter and I and need to change the selected options depending on the value of a drop-down list on the same record producer.
I have tried the script listed here https://www.servicenowguru.com/scripting/client-scripts-scripting/move-list-collector-options/ as a catalog client script, but this is not working.
I have inserted some jslog entries into the script and it seems to fail at
var leftBucket = gel(varName + '_select_0');
The idea is to use a list collecter to create a task for each entry in the list collector. The drop-down provide a list of standard tasks for a set option then the list collector can be used to add or remove should it need to be customized.
Fairly new to SN development so go easy. I can, however, do some simple JS coding.
Thanks
Ray
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2020 10:08 AM
So, to be clear, you want to change the options that have been selected (moved to the right) based on some other form change? You can do this using g_form.setValue() but list collectors have a little twist; you need to supply a comma separated string of sys_id's that match the records displayed in the list collector.
For example, say you have a list collector named "list" that references sys_user and you want to auto-populate two names in the list. You would find the sys_id's of the users and then do this:
//List of sys_ids for users:
var sys_users = '62826bf03710200044e0bfc8bcbe5df1,a8f98bb0eb32010045e1a5115206fe3a'
//set the values in the list collector
g_form.setValue('list', sys_users);
and there you go:
If this was helpful or correct, please be kind and remember to click appropriately!
Michael Jones - Cloudpires
Michael D. Jones
Proud member of the GlideFast Consulting Team!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2020 10:08 AM
So, to be clear, you want to change the options that have been selected (moved to the right) based on some other form change? You can do this using g_form.setValue() but list collectors have a little twist; you need to supply a comma separated string of sys_id's that match the records displayed in the list collector.
For example, say you have a list collector named "list" that references sys_user and you want to auto-populate two names in the list. You would find the sys_id's of the users and then do this:
//List of sys_ids for users:
var sys_users = '62826bf03710200044e0bfc8bcbe5df1,a8f98bb0eb32010045e1a5115206fe3a'
//set the values in the list collector
g_form.setValue('list', sys_users);
and there you go:
If this was helpful or correct, please be kind and remember to click appropriately!
Michael Jones - Cloudpires
Michael D. Jones
Proud member of the GlideFast Consulting Team!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2025 07:52 PM
Hi Michael,
Based on this post, I have tried my requirement, but it is not working. Please check and help what is wrong here.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2020 11:23 AM
Hi Michael,
That works a treat, you wont beleve the time I have wasted on this and it turns out to be so simple.
Thanks again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2025 07:44 PM
Hi,
Based on this article, I am trying the same, but it is not working and not showing anything on rightbucket of list collector.
Could you please help me here.