Decision Table returning null (result_elements missing) when called from Flow Designer field script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Everyone,
I’m working on auto‑routing RITM/sc_task assignment groups based on the requester’s country.
To manage this logic, I created a Decision Table with two inputs:
- u_user → Reference (sys_user)
- u_catalog_item → Reference (sc_cat_item)
And one result column:
- u_assignment_group → Reference (sys_user_group)
In Flow Designer, inside Update Record → Assignment group (script field), I call sn_dt.DecisionTableAPI().getDecision(). But the flow fails with:
Error: Cannot read property "result_elements" from null,Detail: Cannot read property "result_elements" from null
It seems getDecision() is returning null.
Has anyone faced this issue when calling the Decision Table directly from a Flow Designer field script?
Do reference inputs require strictly sys_id strings in Flow Designer scripts, or is this a limitation of DecisionTableAPI when used inside FD?
Note: I'm aware of Flow Logic: Make a decision, but my requirement is to use script in FD field(Assignment Group field).
Any guidance or working examples would be really helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
Try this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
try this
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hope you are doing good.
Did my reply answer your question?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @Ankur Bawiskar
I’m still getting the same error:
Error: Cannot read property "result_elements" from null (Detail: Cannot read property "result_elements" from null).
The same script works as expected in Workflow, but it doesn’t behave the same way in Flow Designer.
Regards,
Aditya

