Decision Table output is JSON which should be parsed to string
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
I have a requirement where i should use decision table for auto assignment of group.. i created decision table and used that in flow designer with action DT -First result evaluation ..Outpput of that action is stored in JSON.
That JSON contain sys id means decision table result elements...inside the result elements i will have assignment group..Now i need script action to convert that JSON to string and use in update record action to update assignment group..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hello Sravya
To convert the JSON output from a decision table in Flow Designer to a string and use it in an Update Record action for updating the assignment group, follow these steps:
- Extract the Assignment Group sys_id from the JSON: The decision table output JSON contains result elements, where each answer element (such as assignment group) is represented with its name and value (sys_id) 1️⃣.
- Stringify the JSON or Extract the Value: Use a script step in Flow Designer to parse the JSON and extract the assignment group sys_id as a string. For example: var result = JSON.parse(decisionTableOutput); var assignmentGroupSysId = result.result.answerElementValues.find(function(element) { return element.answerElementName === 'assignment_group'; }).value; This extracts the sys_id as a string for use in the next step 1️⃣.
- Use in Update Record Action: Pass the extracted assignment group sys_id string to the Update Record action to update the assignment group field.
- Best Practices: If you need to convert the entire JSON object to a string, use JSON.stringify(result) as described in custom payload generation for similar integrations 2️⃣. When using the JSON Parser Action Step, ensure your JSON is properly formatted and does not exceed size or structure limitations 3️⃣.
This approach ensures you can reliably extract and use the assignment group sys_id from the decision table output in your flow
