- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2018 08:29 PM
I am trying to use a table list collector variable base if or switch condition in Service Catalog workflow , where i am checking if the options selected under list collector field contain X then move to next activity to approval stage else move to fulfilment stage. But unfortunately both If and switch activity is not working. Once X selected stil it going to fulfilment stage. Below is the workflow i am using.
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2018 10:31 PM
Hi Pratik,
For this you need to use the if condition with script
answer = checkValue();
function checkValue(){
var values = current.variables.<variableName>.toString();
var split = values.split(",");
var X = sysId to be searched
var arrayUtil = new ArrayUtil();
var value = arrayUtil.contains(split, X);
if(value)
return 'yes';
else
return 'no';
}
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2018 11:22 PM
Hi Pratik,
Can you please mark answer as correct, helpful if this is achieved?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader