Lookup select box variables - remove items from list

ebaileyybs
Tera Expert

Hi,

I have created a lookup select box variable and I need to remove some of the options from the list. How do I remove certain options from a lookup select box variable?

find_real_file.png

Thanks in anticipation!

1 ACCEPTED SOLUTION

ebaileyybs
Tera Expert

I used the below method to remove the options from the 'Lookup Select Box' variable.




Reference Qual: name=hr_case^element=u_sub_category^value!=0^ORvalue=NULL^value!=1^ORvalue=NULL

I copied the reference qualifier from the list view of the choices, using 'copy query';


View solution in original post

7 REPLIES 7

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi, thanks for your reply. Could I use 'g_form.removeOption(<fieldName>, <choiceValue>);' in the reference qualifier to remove options?


Hi Emma,



I agree with Julian. You can do the calculation at the script include which is called through reference qualifier and restrict the options.


To answer your first question, You can use removeoption at the server side i.e script include.


poyntzj
Kilo Sage

Depending on what you are looking to filter and how easy that is to write.


Modify the reference qualifier, or if that is not feasible as you need to perform queries etc,   or the qualifier is too long (and you do not want to increase the size) then I would look at calling a Script Include and let it do the calculation and return the modified reference qualifier