Question on service catalog variables - checkbox and list collector
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2018 02:35 AM
We need to add a new variable in one of our service catalog items that will allow user to select multiple values in the choices. Aside from that, depending on the selected values, the system should determine the right Approver and generate an approval request to that person.
I believe that we can use a check box or list collector. However, if we use a check box, is there a way to not hard-code each value (because the values are around 50)?
If we use a list collector, we can have a table-driven value displayed on it, but how do we get the values that user selected on the list collector and then map it to the table that we have containing the list of Approvers? Is this possible through scripting? Once we know who the required approvers are, the workflow should generate Approval requests for each selected value in the list collector.
Let me know if you have a similar requirement and kindly provide suggestions.
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2018 10:33 PM
Yea karrie,
If you are able to add dynamic values of users you can add,
By using glideRecord fetch the users and add users to array using answer.push();
Here is sample code:
var answer = [];
var member = new GlideRecord('Table NAme');
member.addQuery('u_user.name',"ABC");// add your code here as required
member.query();
while (member.next()) {
answer.push(member.getValue('u_user'));
Thanks,
Tripti S.