Hello all,
I am encountering a problem with my flow that is only running halfway through but gets stuck at the "Condition" field with the following error message:
InvalidTemplate. Unable to process template language expressions for action 'Condition' at line '1' and column '3381': 'The template language expression 'equals(body('Start_an_approval')?['response'], 'Approve')' cannot be evaluated because property 'response' cannot be selected. Array elements can only be selected using an integer index. Please see https://aka.ms/logicexpressions for usage details.'
The condition formula is:
@equals(body('Start_an_approval')?['response'], 'Approve')
The flow was running smoothly previously but when I edited it to align with additions I had made in the List for added functionality the error message popped up. This is what the "Start an approval" field directly before the "Condition" field looks like:
The flow only runs halfway until the approvals, which are successfully sent to Teams and email, but subsequent actions don't run.
I have tried the commonly recommended 'Save As' fix, as well as exporting and re-importing the flow but to no avail. Any help on this (how to get the flow to run to completion) will be greatly appreciated.
Solved! Go to Solution.
The solution that worked in this case is to embed the rest of the actions into the "Apply to each" action, so that the flow looks like this:
as opposed to the template version where the condition is placed as a separate action, thus resulting in the error message.
Change the Condition so that it is checking the Outcome of the approval:
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Thanks for the suggestion Ellis. When I try changing the condition to 'Outcome' the option doesn't appear in the Dynamic content dropdown selection.
No option from the "Start an approval" action appears. This is what shows up:
The Outcome can only be used after the Wait for an approval action:
For your flow can you make use of the Start and wait for an approval action?
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
The solution that worked in this case is to embed the rest of the actions into the "Apply to each" action, so that the flow looks like this:
as opposed to the template version where the condition is placed as a separate action, thus resulting in the error message.
User | Count |
---|---|
26 | |
13 | |
12 | |
9 | |
8 |
User | Count |
---|---|
49 | |
29 | |
23 | |
20 | |
20 |