Decision Action in Flow Designer - log which question it chooses
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2023 12:13 AM
Within our incident assignment workflow, there's a decision action. Our sys_decision_question contains several entries for the decision table, some sharing the same assignment group. We aim to track the specific question chosen by the decision action, noting the associated label and order. This information will help us identify the selected option and provide the corresponding answer.
Labels:
- Labels:
-
Incident Management
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2025 04:43 AM
Hello Bex, i believe what you are looking for is stored in the "result_elements" of the DT.
The code snippet provides the snippet ootb-
try{
var inputs={};
inputs['u_abc'] = ;
inputs['u_xyz'] = ;
var dt = new sn_dt.DecisionTableAPI();
var response = dt.getDecision('your DT sys_id', inputs);
var result_elements = response.result_elements;
var u_benign_type = result_elements.u_benign_type.getValue(); // String
}
catch(e){
gs.log("Couldn't run this script Error: "+e)
}
If this does not help your query then please hop over to the following link, which has all the data about the DT APIs objects to access - https://www.servicenow.com/docs/bundle/yokohama-api-reference/page/app-store/dev_portal/API_referenc...
Hope this will answer your query or if anyone else's too. Thank you!