Add options to the sys_choice table

DeIvory Gordon
Tera Guru

Hello,

I have to create a field on a catalog item giving users the option to select "Library or List".

If 'Library' is chosen, a *multi-selection* dropdown is needed with the following options:

 

Site Secure
Safety
Environmental
Product Safety
Voice of Customer
Operational Strategy
Other

 

I have created a a *multi-selection* dropdown before, but it referenced a certain table, the location table.  In this instance there is no table with the above options, so I will have to add the options to the sys_choice table, but I am not sure how to do it.  If you can, will you explain plainly how do this?  Thanks!

3 ACCEPTED SOLUTIONS

Vishal Jaswal
Tera Sage

Hello @DeIvory Gordon 

The catalog item doesn't provide a multiple select dropdown as of today. The only variable type which sort of look alike a dropdown would be checkbox.

If you have already explored List Collector then you know that you have to create a custom table with these choices to be populated.


Hope that helps!

View solution in original post

Rafael Batistot
Mega Patron

Hi @DeIvory Gordon 

 

The key point is that you don't need to create records in sys_choice for this requirement.

 

In ServiceNow, create the variables directly on the Catalog Item:

 

1. Create a Select Box variable named Library or List, with choices Library and List.

2. Create a List Collector variable for the library options.

3. Configure the List Collector's List table and Reference qualifier to retrieve the available options.

 

If this response was helpful, please mark it as Helpful and, if applicable, as Correct.
This helps other users find accurate and useful information more easily

View solution in original post

IbrarA
Kilo Sage

@DeIvory Gordon 

Catalog variable choices live in "question_choice", not "sys_choice". That second one holds choices for fields on tables, which is probably why you couldn’t find where to put them.

You can skip the custom table too. Create a Select Box variable, add your seven choices to it, then hide it from the form. Those choices now sit in "question_choice" against that variable. Point your List Collector at "question_choice" and use the reference qualifier to filter on that variable’s sys_id, so only your seven show up.

Same approach covered here:
https://www.servicenow.com/community/developer-forum/multiple-selection-in-catalog-item-variable-mai...

ibrar

View solution in original post

3 REPLIES 3

Vishal Jaswal
Tera Sage

Hello @DeIvory Gordon 

The catalog item doesn't provide a multiple select dropdown as of today. The only variable type which sort of look alike a dropdown would be checkbox.

If you have already explored List Collector then you know that you have to create a custom table with these choices to be populated.


Hope that helps!

Rafael Batistot
Mega Patron

Hi @DeIvory Gordon 

 

The key point is that you don't need to create records in sys_choice for this requirement.

 

In ServiceNow, create the variables directly on the Catalog Item:

 

1. Create a Select Box variable named Library or List, with choices Library and List.

2. Create a List Collector variable for the library options.

3. Configure the List Collector's List table and Reference qualifier to retrieve the available options.

 

If this response was helpful, please mark it as Helpful and, if applicable, as Correct.
This helps other users find accurate and useful information more easily

IbrarA
Kilo Sage

@DeIvory Gordon 

Catalog variable choices live in "question_choice", not "sys_choice". That second one holds choices for fields on tables, which is probably why you couldn’t find where to put them.

You can skip the custom table too. Create a Select Box variable, add your seven choices to it, then hide it from the form. Those choices now sit in "question_choice" against that variable. Point your List Collector at "question_choice" and use the reference qualifier to filter on that variable’s sys_id, so only your seven show up.

Same approach covered here:
https://www.servicenow.com/community/developer-forum/multiple-selection-in-catalog-item-variable-mai...

ibrar