- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2025 05:09 AM
Hi,
we currently have a problem, that a 'look up record' we use in a Flow only works sometimes. And I don't understand why.
We search in the sys_user table. And the condition is 'Sys ID' is "Trigger - Service Catalog > Requested Item Record > Requested for > Sys ID".
In the previous action (get Catalog Variables) we successfully get the requested_for user, so the User definitely exists. But in the next step it sometimes contains the Condition Sys ID="xxx" and sometimes its empty.
What really confuses me, is that it worked in most cases.
So whats the reason why the Trigger sometimes finds the Sys_ID and sometimes doesnt?
(I don't really need a solution, because I already found a alternative way. But it would still be helpful in general why it doesnt work.)
Best regards
Maximilian
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2025 05:42 AM
You should run flow as "System User"
May be it's running in user's session and that user doesn't have read access to the User Record.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2025 03:18 PM
This kind of issue with the “Look Up Record” action in Flow Designer is actually more common than it seems and usually relates to timing or data availability at runtime.
From your description, it sounds like the issue may be caused by the fact that the requested_for field isn’t fully populated at the moment the lookup action runs. Even though it appears correctly in the previous step (like when retrieving catalog variables), the Flow might be executing the “Look Up Record” before that data is reliably committed or accessible.
A few possible causes and tips:
- Race Condition or Execution Order: Even though Flow Designer looks linear, some actions may execute before the data is ready. Try inserting a small delay or a “Wait for Condition” step to ensure the data is available before lookup.
- Use Logging: Add a Log action just before the Look Up Record to log what value is being passed in the condition. It’ll help confirm if the Sys_ID is populated correctly at that step.
- Null Checks: Add a conditional check to ensure requested_for is not null or undefined before performing the lookup.
- Data Dependency on Trigger Source: If the Flow is triggered on a Requested Item, and you’re trying to access data from a higher-level record (like the catalog request or requested_for), make sure you’re referencing it correctly using dot-walking. Sometimes requested_item.request.requested_for behaves differently from requested_item.requested_for.
Even though you’ve found an alternative approach, it’s great to analyze these behaviors because they often hint at design-time assumptions not aligning with runtime behavior.
Hope this helps clarify things!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2025 05:42 AM
You should run flow as "System User"
May be it's running in user's session and that user doesn't have read access to the User Record.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2025 06:43 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2025 03:18 PM
This kind of issue with the “Look Up Record” action in Flow Designer is actually more common than it seems and usually relates to timing or data availability at runtime.
From your description, it sounds like the issue may be caused by the fact that the requested_for field isn’t fully populated at the moment the lookup action runs. Even though it appears correctly in the previous step (like when retrieving catalog variables), the Flow might be executing the “Look Up Record” before that data is reliably committed or accessible.
A few possible causes and tips:
- Race Condition or Execution Order: Even though Flow Designer looks linear, some actions may execute before the data is ready. Try inserting a small delay or a “Wait for Condition” step to ensure the data is available before lookup.
- Use Logging: Add a Log action just before the Look Up Record to log what value is being passed in the condition. It’ll help confirm if the Sys_ID is populated correctly at that step.
- Null Checks: Add a conditional check to ensure requested_for is not null or undefined before performing the lookup.
- Data Dependency on Trigger Source: If the Flow is triggered on a Requested Item, and you’re trying to access data from a higher-level record (like the catalog request or requested_for), make sure you’re referencing it correctly using dot-walking. Sometimes requested_item.request.requested_for behaves differently from requested_item.requested_for.
Even though you’ve found an alternative approach, it’s great to analyze these behaviors because they often hint at design-time assumptions not aligning with runtime behavior.
Hope this helps clarify things!
