I have a SP list with a number column. In my flow, I'm have a loop that gets all the elements with todays day and then increment an Integer variable with the numbers from the number column. When I try to run it, I get the errormessage
"ExpressionEvaluationFailed. The execution of template action 'Dagens_bestillinger' failed:
the result of the evaluation of 'foreach' expression '@outputs('Get_item')?['body/ID']' is of type 'Integer'.
The result must be a valid array."
Why must the result be a valid array and how can I make that happen? It's a number I want to get out of it.
Solved! Go to Solution.
It seems that the ID column is a multi-value one. Am I right? Could the ID column have multiple values? If so, you should select, for example, the first element, and add it to the variable "dagens skinke og ost".
To solve it:
1) remove the "for each element" in the yes condition result.
2) In the Increment variable action, you should write an expression like, so you get the first element of the ID field.
Hope it helps!
Thanks for your answer @fchopo. It is multi-value, but I want each of the items to add their columnvalue to the variable, not just the first.
Here is my senario: I have people ordering food through a MS Form for a specific date, it then goes in to a list in SP. Here it is 4 number columns that hold how many items of each food the person wants and ha datecolumn. Each day a flow triggers and goes through alle the columns and find the once from today. Alle this works fine. But then it should go througt the items for today and add the sum of each of the four columns together. So I get 2 salads, 4 sandwiches and 2 apples for example.
As I understand, you need to sum 4 columns... So you could use an expression like this in the "increment variable" action:
Hope it helps!
I don't want to sum the 4 columns, I want to sum alle the items in the list for each column separetly. So I need the for each item to get all the items
Check out new user group experience and if you are a leader please create your group
On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks
Check out how to claim yours today!
Test your skills now with the Cloud Skill Challenge.