The Now Platform® Washington DC release is live. Watch now!

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Remove an option from select box variable in the catalog item form

Eli Guttman
Giga Guru

Hi,

 

I have a form, with a select box variable. the option is this select box is defined question choice.

 

Now, one of the values is no longer relevant, and i would like to deactivate it - meaning i don't want it to appear anymore for users, but i also don't want to delete as a value.

 

what is the best way to remove it in the catalog item form?

 

Thank you!

1 ACCEPTED SOLUTION

Mark Stanger
ServiceNow Employee
ServiceNow Employee

Unfortunately, there's not a built-in 'Active' flag for these.   I usually just end up deleting the choice but you could also add the choice to a separate, unassociated dummy variable just so you could keep it around but not have it visible.   Outside of that, you can remove the choices with client scripting but that's not really a good solution if you're doing away with the choice for good.



g_form.removeOption('duration', 'twelve_months');


View solution in original post

9 REPLIES 9

Mark Stanger
ServiceNow Employee
ServiceNow Employee

Unfortunately, there's not a built-in 'Active' flag for these.   I usually just end up deleting the choice but you could also add the choice to a separate, unassociated dummy variable just so you could keep it around but not have it visible.   Outside of that, you can remove the choices with client scripting but that's not really a good solution if you're doing away with the choice for good.



g_form.removeOption('duration', 'twelve_months');


Thank you,



g_form.removeOption('duration', 'twelve_months'); is what is was looking for.


I'm glad it helped.   Please mark my answer as correct if I've answered your question.


I would love to, but i'm not sure how.



I know that there suppose to be a button to make answers as true, but for some reason i don't see it next to you answer or my question.



Do you have any idea why?