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

Community site session details

Session Id : 4L0Z4Ez9ROxAkTsoT6rPup
Power Automate - Power Automate Desktop
Answered

Looping flow based on a list of variables

Like (0) ShareShare
ReportReport
Posted on 8 Aug 2022 15:07:41 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)
  • BCWdesign Profile Picture
    56 on 09 Aug 2022 at 07:09:59
    Re: Looping flow based on a list of variables

    Thank you this is very helpful!

     

  • Verified answer
    Pavel_NaNoi Profile Picture
    1,072 on 08 Aug 2022 at 16:35:17
    Re: Looping flow based on a list of variables

    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 08 Aug 2022 at 15:40:18
    Re: Looping flow based on a list of variables

    Capture3.pngCapture2.pngCapture1.PNG

  • Pavel_NaNoi Profile Picture
    1,072 on 08 Aug 2022 at 15:21:49
    Re: Looping flow based on a list of variables

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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 725 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 363 Moderator

#3
Power Apps 1919 Profile Picture

Power Apps 1919 341

Last 30 days Overall leaderboard
Loading complete