Dynamically add items to List Collector from client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2017 03:20 PM
Hi,
Just wondering if it's possible to dynamically add items to a list collector from within a client script.
The problem I'm trying to solve is the fact that we're grabbing information from a server script include - which reaches out to the ECC queue - and its returning information from a MID server powershell script to the client script.
We would like to have the ability to select one or more items when the results are returned. Currently I'm using a select box (with .addOption), but you can't select more than one at a time.
Is there anyway of transforming a List Collector variable (or a different form variable) into a multi-select variable that you could dynamically populate from a client script?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2017 03:42 PM
Please refer below which has code to dynamically populate list collector.
https://www.servicenowguru.com/scripting/client-scripts-scripting/move-list-collector-options/
REgards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2017 11:46 AM
Hi Sachin, this is not what I'm looking for.
This simply "allows you to move one or more selected options from one side of a list collector variable slushbucket to another"
I need to be able to dynamically add entries to the list without storing it in a static table first.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2017 03:52 PM
inorder to use list collector variable you need to store the data received from mid server in a table and display the values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2017 11:47 AM
Hi dvp, I thought of doing this, but I would have to target one table specifically, and it would be a lot of work instead of just being able to dynamically add items into the list collector directly. (or if there is another variable that you can select multiple entries that may work as well).