Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
I have a list collector variable with and an Yes/No variable. If the user selects Yes It should select all the values in the list collector. I'm able to do this if the user is not using the Service Portal using Move List Collector Options. Is there a similar script that will work in the Service Portal?
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
The Service Portal list collector is an Angular widget, not the classic slushbucket DOM, so getControl().ms doesn't apply. Instead, set the value directly — g_form.setValue() accepts a comma-separated string of sys_ids.
Try below
Add glide_list=true to the list collector variable's attributes (required for reliable setValue behavior in Service Portal).
Catalog Client Script onChange of the Yes/No variable, applied to both Catalog Item and Service Portal.
On "Yes," call a client-callable Script Include via GlideAjax that returns all sys_ids matching the same query as the list collector's reference qualifier.
Pass the comma-separated result into g_form.setValue(). On "No," clear it.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
The Service Portal list collector is an Angular widget, not the classic slushbucket DOM, so getControl().ms doesn't apply. Instead, set the value directly — g_form.setValue() accepts a comma-separated string of sys_ids.
Try below
Add glide_list=true to the list collector variable's attributes (required for reliable setValue behavior in Service Portal).
Catalog Client Script onChange of the Yes/No variable, applied to both Catalog Item and Service Portal.
On "Yes," call a client-callable Script Include via GlideAjax that returns all sys_ids matching the same query as the list collector's reference qualifier.
Pass the comma-separated result into g_form.setValue(). On "No," clear it.
