cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

requirement of "Apply to each" for setting a variable

We are using a flow with variables and a lot of approvals. The flow was running fine for several months.

It includes several approvals and after each approval a variable has to be set. When the flow was created an "Apply to each" task was required to fill the variable after the approval with the comment of the approver. Since some weeks those apply to each actions failed, when the comment was empty. This wasn't a problem before. Now the flow fails, when the comment is left empty, with the attached error. But also the Apply to each is no longer required for setting the variable after an approval, so I removed all "Apply to each" actions in this flow and filled the variable directly afterwards.

I'd like to know after all where those changes are documented, to keep our buisness processes running without interruptions.

picture.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: requirement of "Apply to each" for setting a variable

Hi @Anonymous,

 

Could you please share a screenshot of the configuration of your flow?

What has changed in your flow so the flow run failed?

 

I see that you have a expression @body('Start_an_approval')?['responses'] in your flow, so I guess you have set the Approval type of "Everyone from the assigned list", do you change the Approval type in your flow to "Anyone from the assigned list"? the expression @body('Start_an_approval')?['responses'] would only work for Approval type of "Everyone from the assigned list", If you change the the Approval type in your flow to "Anyone from the assigned list", the expression @body('Start_an_approval')?['responses'] wouldn't work.

 

I have made a test on my side to create a flow as below:

Capture.PNG

 

The flow would run failed with the same error as you as below:

Capture.PNG

 

So please check your flow and please create two different flow if you would needs Approval type of "Everyone from the assigned list" and "Anyone from the assigned list".

 

Best regards,

Alice

 

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: requirement of "Apply to each" for setting a variable

Hi @Anonymous,

 

Could you please share a screenshot of the configuration of your flow?

What has changed in your flow so the flow run failed?

 

I see that you have a expression @body('Start_an_approval')?['responses'] in your flow, so I guess you have set the Approval type of "Everyone from the assigned list", do you change the Approval type in your flow to "Anyone from the assigned list"? the expression @body('Start_an_approval')?['responses'] would only work for Approval type of "Everyone from the assigned list", If you change the the Approval type in your flow to "Anyone from the assigned list", the expression @body('Start_an_approval')?['responses'] wouldn't work.

 

I have made a test on my side to create a flow as below:

Capture.PNG

 

The flow would run failed with the same error as you as below:

Capture.PNG

 

So please check your flow and please create two different flow if you would needs Approval type of "Everyone from the assigned list" and "Anyone from the assigned list".

 

Best regards,

Alice

 

View solution in original post

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (4,832)