
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 08-02-2025 11:44 PM
Hello Community,
Are you using flow designer flow variables? If so, do you know their potential?
Let's understand this with a few practical examples 😁:
1. Let's say you want to check if any ad hoc catalog task has been created. If so, you need to wait for that task to complete before proceeding with request closure
When we look at this scenario, we might immediately think to use
"Look Up Record" and "Wait for Condition" right? However it's not necessary that an ad hoc task will always exist.
If you use "Look up Record" and no record is found, the whole flow will error out. To counter this you need to check the "Don't fail on error" checkbox (set it to true) and then use an "If" condition to check if the record exists before using "Wait for Condition." using status which not reliable!
OR
If you use this logic directly in "Wait for Condition" to get an ad hoc record, it will fail when there is no ad hoc record
Is there a better way to handle this?
yes, Use reference type flow variable.
Below is a sample catalog item with the following steps:
A) Submit the catalog item.
B) Send for Requested For manager approval.
C) Check if an ad hoc task exists using a flow variable.
D) Fulfill the RITM.
Catalog Item:
Flow Designer flow:
Lets understand the above flow variable logic
1)Create a flow variable type reference and select "sc_task" table
2)Add a logic get "sc_task" record
3)use this in the Wait for condition if record found as below
Result:
RITM - Approval (Approved) and Ad hoc task
Flow context:😍
This gives you more control over what to return when you set the flow variable.
If you are using "Look Up Record," then you need to enable this option and use an "If" condition to check its output.
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
My other articles :
Script Action: A Practical Example!
A Quick Guide to Adding a Wizard Section to a Catalog Item in Catalog Builder!
Set different “From” and “Reply To” emails for the Native and Flow designer Emails/Notifications.
Read .CSV formatted files in ServiceNow
Automate Assessment/Survey Testing with ATF(Including Multiple Option,Attachments &Reference fields)
Set up interactive filter on UI builder (for data visualization reports and List records)
Set Up "Step Based Request Fulfillment" for Catalog Items
Need to know about Schedules and Define them in SLAs
My ServiceNow Share Projects:
Return Assessment Feature in ServiceNow
Add signature and update fields to a fillable PDF document
Get Record URL action in the flow designer (Use it in the Send Email action)
- 627 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Hemanth M1 Very value added post, thank you for sharing

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content