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.
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.
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
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.
I've just updated the post
Then please share the whole flow diagram to see where the problem might be.
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.
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.