cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nisarahmed
Level: Power Up

Comments Mandatory in Approval flow

Hi i'm new to the microsoft flow is there i way to make comments mandatory while approving or rejecting, right now i'm getting the comments as optional.If its possible to make it mandatory it will helpful if you give me a link or something which shows how its done.

Thanks in advance.

5 REPLIES 5
Super User
Super User

Re: Comments Mandatory in Approval flow

I don't think that there is a way to do this at the moment. You could create a new approval task and use a do-until the comment is filled in.

Highlighted
Community Support Team
Community Support Team

Re: Comments Mandatory in Approval flow

Hi @Nisarahmed,

 

Do you want to force users entering comments while approving or rejecting an approval email?

 

I agree with @Pieter_Veenstra's thought almost, if you want to enforce users entering comments while approving or rejecting an approval email directly, I afraid that there is no way to achieve your needs. If you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

In addition, you could consider take a try with the following workaround as an alternative solution:

  • Add a proper trigger, here I use Flow Button trigger.
  • Add a "Start an approval" action, specify Assigned to field.
  • Add a Condition, click "Edit in advanced mode", type the following formula:
@empty(body('Start_an_approval')?['comments'])
  • Within "If/yes" branch of Condition, add a "Do Until" action. Within "Do Until" Condition box, click "Edit in advanced mode", type the following formula:
@not(empty(body('Start_an_approval_2')?['comments']))

 Within "Do Until" action, add a "Send an email" action, To field set to Approver email dynamic content of the "Start an approval" action. Then add a "Start an approval 2" action, specify Assigned to field.

 

Image reference:2.JPG

 

3.JPG

The flow works successfully as below:4.JPG

 

 

The user @lreinhard7 has faced same issue with you, please check the following thread:

https://powerusers.microsoft.com/t5/General-Flow-Discussion/Approval-Email-Force-user-to-enter-comme...

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
zshane15
Level: Powered On

Re: Comments Mandatory in Approval flow

If anyone else was struggling with this while using the "Stop and wait for an approval" action, make sure to set "Approval Type" to "Approve/Reject - First to respond".

 

If your workflow requires "Everyone must approve" then you will need to append comment to a string and have the Do Until loop check its length in order to achieve this workaround.

 

The reason is, each reponse's comments are stored in an array. So you can't just check 

 

@not(empty(body('Start_and_wait_for_an_approval')?['comments']))

 

Also, you can get rid of the second check and just use one Do Until loop. Makes it a bit cleaner.

RamblingTweep
Level: Powered On

Re: Comments Mandatory in Approval flow

Hi,

Is it possible that comment is only mandatory for Reject and not for Approve? 

 

and hence the reason of Rejection will send an email for action. 

 

 

ZachS15
Level: Powered On

Re: Comments Mandatory in Approval flow

Yes, that's how mine is setup. You can adjust the do until logic to check also for Response is Approve or Response is Reject and Comment is not null. Again keep in mind this if for "First to approve". You will still have to append responses to an array and check length for parallel approvals.

 

 

@or(
equals(body('Start_and_wait_for_an_approval')?['response'], 'Approve'),
and(
equals(body('Start_and_wait_for_an_approval')?['response'], 'Reject'),
not(empty(body('Start_and_wait_for_an_approval')?['comments'])
)
)

 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 258 members 5,030 guests
Please welcome our newest community members: