
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-04-2018 08:54 AM
Nearly home time!
We have a number of service requests that use a list collector to gather a list of users to be added or removed from particular groups. We use 'glide_list,no_filter' in the variable attributes so that the users can be added in a single line entry rather that the typical 'box' view associated with a list collector - see below:
We also use ref_ac_columns=email,ref_ac_columns_search=true etc etc in the attributes so that it shows their email address alongside their name when we search, so that we can uniquely identify each user.
The problem I have is that although the requester has selected their unique users, the support team still only see a field containing Name, and so dont know if it was joe.1.bloggs or joe.2.bloggs that was chosen. They have asked if its possible to add an additional field to the task (yes) but how do I then populate this field with the unique user id of each user selected in the list variable?? Or is it possible to return both Name and User ID in the list variable??
Note I dont want to change the display value on the sys_user table.
Thanks in advance
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2018 12:26 AM
You can add additional fields below the list collector as a display if glide_list attribute is removed and this is the simplest way to do it.
Refer to this link to see on how it works: https://www.servicenowguru.com/system-ui/customizing-slushbucket/
If you need to go towards the AJAX, then you can try that also
1) You will need to read only variable to display User ID's
2) An onChange client script on the list collector which will make the AJAX call to the server. The value of list collector is a comma separated list of user Sys IDs and you should pass these value to the server side. The same client script will also receive the response back from server and then update the read only variable
3) A client callable script include which receives the values, splits it with a comma separator, Loop and query the user table for each of the SYS IDs and then fetch the User Ids in a Array. The Array should be joined with a comma separator and returned back to the client script to display it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2018 04:36 AM
If you have not started, then start with the flow designer first. Good Luck!!