When it comes to allowing multiple selections on a catalog variable without creating a bank of checkboxes or a bunch of extra variables for users to read through, the list collector variable type in the service catalog is very useful when you have a table to reference to generate your options.

Here’s a quick overview of how to use it when you want the user to be able to select multiple values but do not want the administrative overhead that can come with a whole new table every time your stakeholders want a multiple choice, multiple selection variable.

Let’s get started:

1. On your catalog item, create a new multiple choice or select box variable (either will work, we are after the “Choices” related list here), give it a name and some question text and then submit.

list-collector-1

2. Add any choices your variable needs.

list-collector-2

3. Switch the variable type over to a list collector. You will notice that we cannot save until we give ServiceNow a table to reference so pick Question Choice [question_choice]

list-collector-3

4. Add a reference qualifier of “question=XXXX” where XXXX is the question’s sys_id.

list-collector-4

 

 

 

5. (Optional) You may want to deactivate the “Question Choice Related List” client script or modify the if statement in the script to be if (newValue == “3” || newValue == “5” || newValue == “21”) to show the Question Choice related list on list collector variables.

list-collector-5

6. You now have a list collector variable without having to create a whole new table.

list-collector-6

7. (Optional) You can now think about adding variable attributes such as no_filter or glide_list to alter the variable’s appearance on the form.

This can be used to easily convert multiple choice or select box variables into list collectors. The real advantage to making these variables are when cleaning up catalog items with lots of checkboxes. With a single, mandatory list collector, the user can select any options they need with the added benefit of being less tedious than creating multiple checkbox variables.

Keep in mind: List collectors also look different when viewing the item in Service Portal. While the list collector is rather bulky on the regular catalog form, it is very clean when viewed in Service Portal.

list-collector-7

list-collector-7-2

There will be times that a new table is preferable for populating a list collector variable, and this should not replace creating a regular list collector backed by a table, but it is immensely helpful when cleaning up catalog items and saving you from needing to create tons of checkboxes.

If you’d like to learn even more ServiceNow tips and tricks, connect with the Covestic team at servicenow@covestic.com. You can also check out another one of our ServiceNow tips and tricks blogs here.