list collector not working in If condition activity in workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 11:00 AM
Hi All,
I have a requirement in service catalog wherein there is one field 'environment' this is a list collector which has 3 options Prod, Pre prod and prod&preprod , so when the user selects only prod one task should get created , when user selects only pre prod one task should get created , but when user selects 3rd option prod&pre-prod then 2 task should get created.
I have achieved this by changing the field type as 'Select Box' but when i am changing to list collector is it not working.
i have tried the if activity and switch activity both are not working when the field type is list collector and its working when the field type is select box but i need this to work with list collector.
I have to use here only workflow.
Please find the snip of the wf for your ref.
if condition as below:
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 11:04 AM
Hello @siddharth26
Try changing to contains and check if it us working.
Please mark the answer as correct solution and helpful if helped.
Kind Regards,
Ravi chandra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 11:12 AM
Hi Ravi,
I have changed to contains still its not working
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 11:19 AM
Hello @siddharth26
Use if Condiion with Script.
refer:
answer = ifScript();
function ifScript(){
var env = current.variables.environment.toString();
if(env.indexOf('sys_ids of values') != -1)
return 'yes';
else
return 'no';
}
Please mark the answer as correct solution and helpful if helped.
Kind Regards,
Ravichandra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2023 10:44 PM
Hello @siddharth26
Greetings!
Any feedback on my reply?
Please mark the answer as correct solution and helpful if helped.
Kind Regards,
Ravi Chandra