Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Limit the iterations.

saikumarkak
Tera Contributor

saikumarkak_0-1767606753043.png
Hi Team,
I have created the flow designer on catalog item. it is working fine upon it. now when in the else part (S.No : 13) I have taken the "Go Back to" tool it was going back correctly. but i need to stop that go back to for certain limit means for only 3 times after 3rd time i won't go back it moves to the forward. how can i achieve this. i want set limit to that go back to tool.

 

1 ACCEPTED SOLUTION

@saikumarkak 

Hope you are doing good.

Did my reply answer your question?

💡 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  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

6 REPLIES 6

Dr Atul G- LNG
Tera Patron

HI @saikumarkak 

 

https://www.servicenow.com/docs/bundle/zurich-build-workflows/page/administer/flow-designer/referenc...

 

might be helpful. 

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron

@saikumarkak 

Steps

-> create a flow variable of type Integer and initialize with 0

-> Just before using Go back use "Set Flow Variables" flow logic and increment it by 1 using script

-> After "Set Flow Variables" use IF flow logic and check the value of that flow variable

-> if reached to 3 then don't go to the Go back step, simply use "Exit Loop" or jump to other action

💡 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  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron

@saikumarkak 

another way

-> create flow variable of type Integer and store value as 0 in it using "Set Flow Variables" flow logic

-> then use Do the following 

a) your flow actions

b) use "Set Flow Variables" flow logic to increment the count by 1

-> Until count is 3

See this and enhance your flow so that it runs 3 times

run flow 3 times based on flow variable.gif

💡 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  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar ,
In the "do the following Until " tool  "Go Back" tool is not working.
here, My query is i want to limit the go back tool loop only certain times after certain limit overs the flow should move forward.