- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2022 02:22 AM
Hello!
I have a catalog item with a list collector variable.
I want to populate this variable with specific users (ex. User A, User B, User C). I've tried using the below (Catalog Client Script) using system properties but it does not work.
function onSubmit() {
g_form.setValue('list_collector_variable', 'sysprop_sysid1, sysprop_sysid2, sysprop_sysid3');
}
Please help!
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2022 02:35 AM
store the comma separated sysIds in system property and use it
javascript: gs.getProperty('propertyName');
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2022 02:34 AM
Hi,
why not give default value as comma separated sysIds of those users in that variable configuration?
no script required
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2022 02:35 AM
store the comma separated sysIds in system property and use it
javascript: gs.getProperty('propertyName');
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2022 04:51 AM
HI
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2022 02:44 AM
Hi
function onSubmit() {
var cond = g_form.getDisplayValue('some_reference_variable');
if (cond == 'ServiceNow') {
g_form.setValue('list_collector_variable', 'sysprop_sysid1, sysprop_sysid2, sysprop_sysid3');
}
}