I am trying to make a multi-stage approval flow. The first stage requires that all must approve. It therefore outputs an Outcome field that must be used for the condition that follows. Because the Outcome field is used in multiple places (e.g. in teams messages to the user), a "for each" card is inserted.
Note: This was originally inserted when I used the "responses" field, before I knew I needed to use Outcome. However on trying to create this condition from scratch it reappears when a teams message is inserted.
On running, I encounter the following error:
The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@outputs('Start_and_wait_for_an_approval')?['body/outcome']' is of type 'String'. The result must be a valid array.
- Do I need to convert the Outcomes field to an array?
- How do I do this in this circumstance?
- Also, is the correct output to test for from Outcome "Approve" and "Reject" or should I be looking for "Approve, Approve"?
- Why is this not required in the guidance document for this kind of approval on the MS pages?
Thanks