Getting value of choices from List Collector through (IF Condition)
Import
·
Nov 09, 2021
·
article
Hi Guys,
So I ran into this issue for Setting up the IF condition for grabbing Value from List collector I somehow managed to resolve the issue.
Please use this Script if you are having similar issues.
Please Mark if this is helpful.
Thanks
answer = checkValue();
function checkValue() {
var values = current.variables.What_type_of_change_are_you_requestin.toString(); // name of variable
var split = values.split(",");
var X = '526f87031bac78102cf898221a4bcb27'; //Email address change (sysid of choice)
var arrayUtil = new ArrayUtil();
var value = arrayUtil.contains(split, X);
if (value)
return 'yes';
else
return 'no';
}
View original source
https://www.servicenow.com/community/itsm-articles/getting-value-of-choices-from-list-collector-through-if/ta-p/2308566