cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nisarahmed
Regular Visitor

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.

6 REPLIES 6
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
Community Support

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
Frequent Visitor

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
Regular Visitor

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
Regular Visitor

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'])
)
)

 

leo24
New Member

Re: Comments Mandatory in Approval flow

Hi,

 

I have a problem. I don't understand how I should configure the condition to make the approval comment field mandatory. In my approval there is only one possible answer but the approver must mandatory fill in the comment field.

 

Help please... 😭

 

Thanks,

 

InkedScreenshot_2020-03-20 Modifier votre flux Power Automate_LI.jpgScreenshot_2020-03-20 Modifier votre flux Power Automate(1).png

 

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: 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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (5,845)