Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Nested loops - referencing content from a previous loop.

(2) ShareShare
ReportReport
Posted on by 4
Hi Power Automators !
 
My flow performs an initial loop to explore the rows of an Excel table that meet a certain condition. When this condition is met, my flow needs to check if a content from the Excel row matches the title of one of the planner tasks. It then performs a second loop inside the first one to check this condition. If this condition is met, the flow updates the task data with data from the Excel. Otherwise, it creates a new task in the planner. However, in my case, when I define the second condition (checking if a content from the row is equal to the task title), an error message appears indicating that the reference to the row content is null. When I add a "compose" action before and during the second loop, I understand that the reference to the Excel table doesn't work in the second loop. How can I fix this problem ?
 
Screenshot 2024-0...

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

  • trice602 Profile Picture
    13,773 Super User 2025 Season 1 on at
    Nested loops - referencing content from a previous loop.
    Hi,
     
    To reference content downstream that is inside a loop, the way to do this is to INITIALIZE VARIABLE at the top of your flow.  Then inside the loop in question, typically at the bottom of the loop, use SET VARIABLE.
     
    That is going to allow you to use/reference your variable's value downstream and works well.
     
     
    ------------------------------------------------


    If this was helpful, please like and/or mark as a verified answer to help others find this too!


    Always glad to help! 💯💯💯💯💯

    Tom 

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

     

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492