The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Wait for condition in flow - to wait until a attachment is attached on ritm

AkshataP30
Tera Contributor

I have a requirement once creation of sctask, wait until attachment is added to sctask/ritm. Once we have an attachment it should go to next steps. I am getting error in flow. How to overcome this, what is the best way?

 

 

3 REPLIES 3

AkshataP30
Tera Contributor

We have added one variable on ritm and based on the updated of that variable it should wait even that is not working 

kaushal_snow
Mega Sage

Hi @AkshataP30 ,

 

Using Do the following until loop logic combined with a Look Up Records or script action checking sys_attachment (filtering by table_name and table_sys_id = your task/ritm record) inside the loop, add a Wait for Duration timer inside that loop so the flow doesn’t exhaust resources or timeout,....then, use flow variables to pass in and remember the record sys_id, and ensure that the flow has permission to read sys_attachment; once the attachment is present, the loop condition becomes true and the flow proceeds...

 

If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.

 

 

Thanks and Regards,
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/

Brad Bowman
Kilo Patron
Kilo Patron

It would be easiest to create a Business Rule which updates an unused or re-purposed field on the sc_req_item record when an attachment is added.  Then your flow just needs to wait for the field on the trigger record to meet a condition (whatever value your Business Rule sets it to).