How to find string in the List collector Selected values?

98 viewsServiceNow

How to find string in the List collector Selected values?

Hi All,

When user select the values from list collector on the service catalog, I need to find the selected value matches the string if yes, I need to create the task. For example Lets assume there are 3 values in the list collector (GoogleQA, GoogleProduction, Google Test) we need to find if the selected values has GoogleProduction if yes,  we need to generate the task.

Answered question
0

Hi,

something like this in server side script

var value = current.variables.variableName.getDisplayValue();
 if(value.indexOf('GoogleProduction') > -1){
 // create task
}

Edited answer
0