how to create loop in flow designer, like rollback activity in the workflow.

Abhishek Dighe
Tera Contributor
 
1 ACCEPTED SOLUTION

Riya Verma
Kilo Sage
Kilo Sage

hi @Abhishek Dighe ,

 

Hope you are doing great.

  1. Start by creating  "iterationCount" = 0.

  2. Next, add a condition action to check if the iterationCount is less than the desired number of iterations for the loop. For example, "iterationCount < 5".

  3. Inside the condition, you can add the activities or actions that you want to repeat within the loop. This can include any ServiceNow actions or custom actions specific to your requirements.

  4. After the activities within the loop, increment the iterationCount variable by 1. This can be done using an assignment action or a script action.

 

iterationCount = iterationCount + 1;

 

  • connect the end of the loop back to the condition action, creating a loop structure
Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Regards,
Riya Verma

View solution in original post

1 REPLY 1

Riya Verma
Kilo Sage
Kilo Sage

hi @Abhishek Dighe ,

 

Hope you are doing great.

  1. Start by creating  "iterationCount" = 0.

  2. Next, add a condition action to check if the iterationCount is less than the desired number of iterations for the loop. For example, "iterationCount < 5".

  3. Inside the condition, you can add the activities or actions that you want to repeat within the loop. This can include any ServiceNow actions or custom actions specific to your requirements.

  4. After the activities within the loop, increment the iterationCount variable by 1. This can be done using an assignment action or a script action.

 

iterationCount = iterationCount + 1;

 

  • connect the end of the loop back to the condition action, creating a loop structure
Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Regards,
Riya Verma