Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Flow designer flow - how to wait until a specific record is created in a specific table

chaithra10
Tera Contributor

Flow designer flow - how to wait until a specific record is created in a specific table:

I am working on building a catalog flow- where I need to update VMI records using Obj ID. This record will be created via vcenter discovery . Catalog flow should look for the VMI based on teh Obj ID entered in the RITM and once found it should update the VMI with group and owner info.

If I give fixed wait till - like 24-48 hours - even if there is a matching record - flow will still wait. I want to exit when the match found.

8 REPLIES 8

chaithra10
Tera Contributor

I am unable to select the VMI table in this wait condition:

chaithra10_0-1764241231499.png

 

 

@chaithra10 what's VMI table? 😛

_____
This reply is 100 % GlideFather and 0 % AI

Ankur Bawiskar
Tera Patron
Tera Patron

@chaithra10 

Why not handle the further logic in the flow which gets triggered on the Other record insertion itself?

Another way

Try to use 'Do Until' and query for the record with a wait timer in it, and if the query fetches the record, the until stops. Ensure your Do Until doesn't go in infinite loop

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

@chaithra10 

My thoughts

  • Add a "Do the following until" block.
  • Inside, use "Look Up Records" on the target table with your condition i.e. Obj ID == Value from RITM
  • Add a "Wait for a Duration" action (e.g., 5 minutes) to avoid rapid polling.
  • The loop exits automatically when the record is found.

Do remember to use a counter variable to prevent infinite loops

Do the following until flow logic 

Count Do-Until loop in Flow designer 

Exit Loop flow logic 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader