cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ungere
Level: Powered On

Assistance With Comments Required Using Do Until

I am trying to use a Do Until to check for mandatory comments when rejecting. I'm using first to respond. I've referenced the solution below but it's not working. I don't know if I need to parse for the approver comments in the second Start An Approval. I've tried several different methods to capture the comments in the second Start An Approval with no luck. The first Start An Approval is working fine. It recognizes there are no comments. My issue is when I enter comments in the Start An Approval using the Do Until. It doesn't recognize that I have entered comments. I have to wait until the count limit is reached. I hope this all makes sense. Thanks.

 

 

 

https://powerusers.microsoft.com/t5/General-Flow-Discussion/Comments-Mandatory-in-Approval-flow/td-p...

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: Assistance With Comments Required Using Do Until

Hi @Ungere 

 

If using Start and wait for an approval action and using the first to respond option

I just tried this out

Logic needs to change a bit

 

in your do until using this expression and compare it to false

empty(body('Start_and_wait_for_an_approval_2')?['responses']?[0]?['comments'])
Note: this worked for me 🙂
 
Capture.PNG
 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 
 

View solution in original post

6 REPLIES 6
Dual Super User
Dual Super User

Re: Assistance With Comments Required Using Do Until

Hi @Ungere 

 

So this technique first checks to see if the first approval action has comments

If it does not then it does a do until and keeps checking for the second approver comments and keeps repeating until it is not empty

 

so yes, in the do until you have to check the second approval action comments response

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Ungere
Level: Powered On

Re: Assistance With Comments Required Using Do Until

Do I check if the comments response is null?
Dual Super User
Dual Super User

Re: Assistance With Comments Required Using Do Until

Hi @Ungere 

 

Yes

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

 The above expression checks to see if the user entered comments or not during the approval process

Note: this is related to the second approval action which is called "Start an approval 2"

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Ungere
Level: Powered On

Re: Assistance With Comments Required Using Do Until

That’s what I’ve been using and for some reason it doesn’t recognize that I’ve entered a comment so the loop just continues. Wonder what could be wrong ?
Highlighted
Dual Super User
Dual Super User

Re: Assistance With Comments Required Using Do Until

Hi @Ungere 

 

If using Start and wait for an approval action and using the first to respond option

I just tried this out

Logic needs to change a bit

 

in your do until using this expression and compare it to false

empty(body('Start_and_wait_for_an_approval_2')?['responses']?[0]?['comments'])
Note: this worked for me 🙂
 
Capture.PNG
 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 
 

View solution in original post

Ungere
Level: Powered On

Re: Assistance With Comments Required Using Do Until

It worked!

 

Thanks Reza !!!!

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,857)