Skip to main content

Notifications

Power Automate - Building Flows
Answered

Append boolean variable to an array

(0) ShareShare
ReportReport
Posted on by

Hello all,

 

I've a flow where I'm trying to create a logic where I'm doing some checks and based on the result of the condition I set a variable to true or false. At the end, I wanna finish with an array with all the results from all items to validate if the array contains a false.

 

My idea was to use a boolean variable and at the end append that variable to an array. But the array is always just getting the last item.

 

Any idea of how to solve this or other way to do it?

 

Here I left some prints of the logic right now:

 

First I'm checking for each Market from a multiselection column on a sharepoint list get all items with that market on other list. The result is for example 3 runs for the first apply to each and then 2 runs for each of those 3.

Miguel_Pst_0-1629718755334.png

 

After that I need to check if those tasks that i get for each market are done. If so, I want to set the boolean variable to true, otherwise false.

Miguel_Pst_1-1629718858944.png

Miguel_Pst_0-1629723975802.png

 

Miguel_Pst_1-1629723999871.png

 

 

I've tried the append action on bellow the set action also and it also replaced the value.

 

I need to save all the MarketCompleted variable results to the array, I've tried to append it in a lot of different places and it always getting just one result.

 

Thanks in advance, 

Miguel

  • Verified answer
    tom_riha Profile Picture
    tom_riha 9,930 on at
    Re: Append boolean variable to an array

    The 'Append to array variable' must be inside the 'Apply to each', that's where you process all the results one by one. If you move it after the 'Apply to each', it'll run after everything is processed and use only the latest value.

  • Miguel_Pst Profile Picture
    Miguel_Pst on at
    Re: Append boolean variable to an array

    I've just updated the post

  • tom_riha Profile Picture
    tom_riha 9,930 on at
    Re: Append boolean variable to an array

    Then please share the whole flow diagram to see where the problem might be.

  • Miguel_Pst Profile Picture
    Miguel_Pst on at
    Re: Append boolean variable to an array

    The set you see on print is for the boolean variable

     

    I want to append that boolean to an array at the end, but it replaces always.

  • tom_riha Profile Picture
    tom_riha 9,930 on at
    Re: Append boolean variable to an array

    Hello @Miguel_Pst ,

    the 'Set...' actions will replace the value in a variable, you want to use the 'Append to array variable' actions to keep adding the values.

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,304

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard