web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Looping flow based on ...
Power Automate
Answered

Looping flow based on a list of variables

(0) ShareShare
ReportReport
Posted on by 56

 

Here is my issue

I have successfully completed the flow which fills in a form based on 3 variables inputted 

I now want to loop this flow so than rather than entering a single variable I enter a list and it works it way through the list

However it never moves onto the 2nd row 

I have included a Next loop but this still doesn't have the desired affect 

I think I have just missed something basic ?

any ideas?

 

 

 

I have the same question (0)
  • Pavel_NaNoi Profile Picture
    1,074 on at

    Need some screenshots of your code, hard to tell what you're doing wrong otherwise.

  • BCWdesign Profile Picture
    56 on at

    Capture3.pngCapture2.pngCapture1.PNG

  • Verified answer
    Pavel_NaNoi Profile Picture
    1,074 on at

    Yeah this won't work, you're just making 3 nested loops, and I'm guessing your variables are single values not a list, so each loop just loops through once, the reason it doesn't go to a 2nd row is because well, your loops just looks at the first value of FinalDate variable, and because its only one variable, it ends, the other two for loops don't do anything either because they've ended already as well, you're only running this once.

     

    I recommend to instead do the following:

    If each variable that is being inputted needs to be used in your automation from flows specifically then:

    Don't bother with the for loop, just remove it entirely, the for loop (only one loop, no need for more) should be in flows, starting your PAD process every iteration (you iterate over how many rows are input, e.g. if two rows of ID, Involvement, Date, then 2 iterations, I'm not sure where your data is stored for this so this part can be tricky).

     

    This is also obviously really slow but easy, however if you want to get around the speed issue then you'll need to get creative with compose actions in flows to create lists that can be input into PAD for quick processing. I'd do something like the following to speed it up:

    - Use 3 compose actions, one for each variable that combines like items together (so all dates together for example) into a list.

    - Send the new variables that are lists into PAD

    - Use a loop with an index (not a for loop) to iterate over the amount of items there are to input, e.g.:

    *Loop start here with value of index 0 *

    Input Singledates[%Index%],

    input ID[%Index%],

    Input Involvement[%Index%]

    Increase value of Index variable by 1

    *Loop end here*

  • BCWdesign Profile Picture
    56 on at

    Thank you this is very helpful!

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard