cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

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.

Community Support
Community Support

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.

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.

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. 

 

 

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

 

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (7,619)