Regarding list collector variable

shreya_3009
ServiceNow Employee

Hello,
I have a variable of type list collector and which is editable, so the variable is populating through api with few countries when the request is created.My requirement is when fulfillers will start work on the request, they should be only able to remove the existing countries which are populated through api from the list collector variable , they should not be able to add.How can i configure this?Any ideas are appreciated.

3 REPLIES 3

Mark Manders
Mega Patron

There is no registration of who added what option to the variable. It's just an update to the variable. 

And if you have edit rights, you are allowed to both remove and create. 

What's your use case? Why would they be allowed to remove, but not add?


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Tanushree Maiti
Mega Sage

It seems at catalog form level , you are populating the list collector using API.

Make that List collector Variable editable in SCTASK form ,so that fulfiller can Update it.

 

Please mark this response as Helpful & accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Nilesh Pol
Kilo Sage

@shreya_3009 Can you try with Onload Client script?

take control of the variable using 

var listCollector = g_form.getControl('your_list_collector_variable_name');

and override addOption function:

if (listCollector) {
        listCollector.addOption = function() {
            // Prevent adding new items
            return false;
        }