Add 3rd condition in a workflow if condition using add condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2023 11:27 PM
Hi,
I tried adding a 3rd condition to a if condition in a workflow to return 'both' (like return no; & return yes;).
I wrote a script with 3 returns for diff conditions;
script example:
if(a=b){
return yes;
}else if(b=c){
return no;
} else if (c=d){
return both;
}
also in the 3rd condition property added : Condition as activity.result='both';
I added logs to check if the script is accessing the if clause to return both, even though the script is accessing the if clause, the condition is returning no.
Is there any pre defined return values that are only to be used? please let me know.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2023 12:25 AM
Change it to a script activity and set the activity.result value directly like (not going to worry about what your example script is supposed to do)...
activity.result = (function(){
if(a==b)
return "yes";
if(b==c){
return "no";
if (c==d){
return "both";
return ""
})()