List collector Clear Option

Brian Lancaster
Tera Sage

I have a catalog task with a UI policy, if Other is selected in the list collector a text box appears.   If someone then choose a different request type that does not have the list collector the text box still appears.   For a drop down I can run the following code to set the drop down back to --None--.   Is there similar code I can use in a client script for a list collector.   This does not appear to work for a list collector.

 

g_form.setValue('changetype', '', '--None--');

1 ACCEPTED SOLUTION

I think this is actually what you're after.



» How to Move List Collector Options with a Catalog Client Script in Service-now



It's designed to work on the front-end catalog form though so I'm not sure how it will work on a back-end catalog task.   In general, you'll have a much better experience with service catalog variables if you refrain from this type of manipulation on the back-end tasks.   They're just not designed with the same capabilities there.


View solution in original post

12 REPLIES 12

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Brian,



I hope this article will answer your question.


http://www.servicenowguru.com/scripting/client-scripts-scripting/changing-filter-list-collector-vari...



Let me know if you have any questions.



Thanks


Pradeep Sharma


I don't want to change the filter.   I want to remove the option they have selected.


I think this is actually what you're after.



» How to Move List Collector Options with a Catalog Client Script in Service-now



It's designed to work on the front-end catalog form though so I'm not sure how it will work on a back-end catalog task.   In general, you'll have a much better experience with service catalog variables if you refrain from this type of manipulation on the back-end tasks.   They're just not designed with the same capabilities there.