How to do a looping in flow designer ?

Krithika R
Tera Contributor

Hi All,

I have a requirement that the flow designer's action should get into a loop based on the users input.

On my record producer I have a choice filed to select how many Client id the user wants to specify. If the user is giving 3 client id means he should enter three client id on the form, based on the entered client id I am querying a system and getting the response for those client ids.
As of now I am able to get the response for only one client Id, I need to pass the rest 2 client Ids dynamically in that action itself and need to get all the response at once. How to achieve that?

This is action script :
find_real_file.png
Action : here I am passing the 1 client id alone 
find_real_file.png
How to loop this based on the number of client Id that user is entering on the form?

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can use Flow variable and use the Do Until

this link has the solution

Flow Designer | Limit Do the Following iteration count.

Also check this link

Creating a counter or turnstile for Flow Designer

Regards
Ankur

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

Hi Ankur,
If I'm using a flow variable means that should also be passed dynamically from the record producer. That is I am having a variable number_of_client_ids (choice field), based on this choice looping should done (If the user selects 3 in that choice means looping should be done thrice).

But the problem here is If I am creating a flow variable I have to pass this choice dynamically, but the data pill in flow variable is not accepting the data type choice 

find_real_file.png