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 : xfy3oU0QeeVmtKq2xP3X7J
Power Automate - Building Flows
Unanswered

Loop reference from within same loop not possible error

Like (1) ShareShare
ReportReport
Posted on 28 Nov 2020 01:25:47 by 250

So I have an Until loop and the input is defined as a dereferencing of an array element, array which is initialized and set before (so outside) the loop. In other words, to make sure that the Until loop checks the condition against each element of the array as it iterates over the array, I set the input to the loop like so:

 

variables('email_body_lines')[iterationIndexes('LOOP10::over_oor_section_until_start_of_spf_section')]

 

iso_0-1606526544327.png

However, I get the following error message:

 

InvalidTemplate. Unable to process template language expressions for action 'LOOP10::over_oor_section_until_start_of_spf_section' at line '1' and column '12373': 'Template language expression cannot be evaluated: the template action 'LOOP10::over_oor_section_until_start_of_spf_section' is not defined at current scope.'.

 

Why? Why can't I reference the loop by name within itself?  How can such a reference not be defined at current scope? For crying out loud, we are inside the loop scope!

I have the same question (0)
  • schwibach Profile Picture
    Moderator on 07 Nov 2022 at 18:35:54
    Re: Loop reference from within same loop not possible error

    I have the same issue.

  • Pritesh Profile Picture
    6 on 30 Mar 2022 at 17:19:06
    Re: Loop reference from within same loop not possible error

    Why can't someone reply to this? I'm having same issue.

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…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete