How to access output of "Make decision" flow logic ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2023 01:21 AM
I've created a decision table that returns group.
I'm trying to access the output of the make decision via inline script but it returns undefined.
var sApprList = fd_data.flow_var.approverlist;
if(fd_data._2__for_each.item.assignment_group){
//This part
sApprList += ',' + fd_data._3__make_a_decision.answer.u_approvergroup;
}
return sApprList;
I'm concatenating result separated by comma because i'm going to used it to an approval rule.
I'm expecting that it should return a sys_id of the group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2023 04:29 AM
Not a direct answer to your question, however you might find it easier to build a subflow for handling the approval instead of an approval rule. Have a look at the OOB "Requested Item Manager Approval" subflow for an example to borrow from.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2023 11:39 AM
Hi @Eddloupe , I was also trying to access output of make decision. Does the above way worked for you?
I was using this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2023 11:34 PM - edited 10-31-2023 11:35 PM
Hi @Eddloupe
Let's try the below script.
fd_data._3__make_a_decision.answer.result_elements.u_approvergroup
OR
fd_data._3__make_a_decision.answer.result_elements.u_approvergroup.sys_id
Also make sure Use Branches unchecked in your step Make a decision.
Let me know if it works for you.
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2023 01:36 AM
Thanks for the code snippet. I was struggling with a similar approach as my variable was returning undefined.
'results_elements' was missing on my code - now I got the appropriate values!
fd_data._3__make_a_decision.answer.result_elements.u_approvergroup.sys_id