- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2023 10:57 AM - edited 12-24-2023 02:21 AM
Hi friends,
Script inside if condition is :
Please correct or suggest any other approach.
Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2023 11:51 AM
Also @Asmita7 ,
U can add one more if condition for the No path to include the 3rd scenario as well in this.
In that condition check if variable is HR then yes else nothing is selected then in that case simply create 2 task one after another in ur workflow.
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2023 11:02 AM
Hi @Asmita7 ,
You are correct. If condition needs to be used over here. U can fetch the value from the variable by doing current.variables.final_task n check if it's finance or HR n based upon that u can have 2 seperate paths created for respective task creation.
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2023 11:40 AM
Thank you for your time.
I tried if condition with this code approach but it is not working. I have edited the question with workflow and the code inside if condition. Please check and suggest.
Thank you,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2023 11:42 AM
Hi @Asmita7 ,
Else is missing in this
function ifScript() {
if (current.variables.final_task == 'FINANCE') {
return 'yes';
}else{
return 'no';
}
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2023 11:51 AM
Also @Asmita7 ,
U can add one more if condition for the No path to include the 3rd scenario as well in this.
In that condition check if variable is HR then yes else nothing is selected then in that case simply create 2 task one after another in ur workflow.
Thanks,
Danish