Skip to main content

Notifications

Power Automate - General Discussion
Answered

Problem with variable initialized in foreach loop

(0) ShareShare
ReportReport
Posted on by 691

Hello,
When I initialize the variable "Montant_Actuel" it automatically goes into a foreach loop, and then when I save my WorkFlow it gives me an error telling me that a variable cannot be initialized in a foreach loop.
How do I remove my variable from the foreach loop?

s44_0-1640857824746.png

 

Thanks in advance !

  • Verified answer
    mahoneypat Profile Picture
    mahoneypat 1,720 on at
    Re: Problem with variable initialized in foreach loop

    You need to initialize outside the ATE loop, and then use the Set variable action to update it in each loop.

    Pat

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard