Values in a select box

Cupcake
Mega Guru

Is there a way or is it even possible to have a list of values in a select box type of variable and only show some of the values based on a the answer to a previous question?

So I have a question called category - which is a select box type that has different values (Envelope, Envelope with no window),

        Then I have a list of item descriptions (that the customer also wants as a select box type) but they only want certain item descriptions to selectable in the list based on the category.

find_real_file.png

Thanks,

Karen

9 REPLIES 9

Community Alums
Not applicable

You'd need a massive, unwieldy client script to do it. You'll have to remove all the choices each time it changes, and add back the ones that are right for the selected option.



as far as I know, there's no capacity to set a dependent value like with fields on a form.


fosborne
ServiceNow Employee
ServiceNow Employee

Hi Karen,


You want to Configure the dictionary for that field.


Go to your form and right-click on the label for whatever you are wanting to be dependent on Category and   select Configure Dictionary.



find_real_file.png


Then set your dependent field


find_real_file.png



Then at bottom in related choices click new to add each of your choices.   Set dependent value based on when you want it to show up


find_real_file.png



-Fred



Please mark Correct if it solved your issue and/or hit Like and Helpful if you find my response worthy.


So Fred I just want to make sure I am understanding this correctly. This is what I am doing:


a) Create a variable called "Category", that variable will be a select box type (add the values)


b) Create another variable called "Envelope Items", make that variable a select box type (do not add the values),


        1) Right click that variable, configure the dictionary


        2) Click on a tab called Dependent field, make it dependent on the category


        3) Then add the choices for the envelope item descriptions, and make that dependent on the category = envelope


c) I am going to repeat this process for every set of category items (Envelope, Envelope w/ no window, etc)



Is that correct?


fosborne
ServiceNow Employee
ServiceNow Employee

Hi Karen,


Sounds like maybe what I was describing.


The choice list will have every description you have.


The decision of where it shows up is based on the value in the "Dependent Value" field of the choice whether it is set to Envelope or Envelope w/ no window.


So quite a few choice records to enter.



Abhinay's approach could also work. If you say wanted to put all those envelops into something like the Consumables table.   This could be good if you also wanted to track inventory and such. Or maybe you have other forms that need to make such a list of choice so you don't have to reenter choices in another dictionary.


Just depends on how you want to track those envelopes.




-Fred



Please mark Correct if it solved your issue and/or hit Like and Helpful if you find my response worthy.