The CreatorCon Call for Content is officially open! Get started here.

Turnstile / loop counter in a subflow?

ILYA STEIN
Tera Guru

I am designing a subflow that needs to perform up to a specified number of checks for a condition. Looking for an approach that will be equivalent to a workflow turnstile, or a counter to use in the loop. Any recommendations?

1 ACCEPTED SOLUTION

kaushal_snow
Mega Sage

Hi @ILYA STEIN ,

 

You can build a turnstile / loop counter in a subflow by giving it an integer input like max_attempts, initializing a flow variable counter to zero, using a Do Until loop that checks counter < max_attempts (or until your condition is met), incrementing the counter each pass, and then outputting whether the condition ever succeeded along with how many attempts were used...

 

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/

View solution in original post

5 REPLIES 5

ILYA STEIN
Tera Guru

Thanks everyone, I accepted Kaushal's answer as the solution, but all of your posts helped.