cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Flow date condition failing....

I am trying to get an email sent to the person in a list “who” field when condition the “Next_work_due” date is today’s date. As a sanity check for testing, I have also temporarily set up an email to the “who” person when the condition is NOT met. 


In my Condition, I have dynamically selected the Next_work_due field, set it to “is equal to” and then today’s date is formatted as:

formatDateTime(utcNow(),dd-MM-yyyy)


I get no error message and the flow is reported as Succeeded. I receive an email letting me know there are no date matches. 

 

In the Run History, the Apply To Each box Condition box is greyed.

The Next_work_due field is set to Date only in the list. The only entry in the list so far is for today’s date. 

 

Please can anyone help get this working, it’s driving me bonkers!

 

Thanks in advance. 

1 ACCEPTED SOLUTION

Accepted Solutions
New Member

I’ve sussed it! The input date (Next_work_due) didn’t need formatting, whereas the utcNow() did. 

Thanks to all who helped. 

View solution in original post

7 REPLIES 7
Super User III
Super User III

Right before your condition, add a compose step, put the dynamic content of Next_work_due field. Then check the format against how your condition is working. The compose is just to aid in the troubleshooting.

Blimey that was a quick reply! I’m away from work now until tomorrow morning but will report back then. 

Resolver I
Resolver I

you need to formatdatetime with the incoming date as the same format for today.  This way, they will be exactly the same.

 

also, on your formatdatetime(utcnow(),'MM-dd-yyyy') needs the ' ' on either side of the format

Thank you, I have corrected the utcNow() string, added matching formatting to the input date and tested it.... still no joy....

Added Compose and checked it - the date input and output are 2020-11-27. I have changed the Next_work_due and UTCnow() format to yyyy-MM-dd to match the format output of Compose. Still no joy....

The Condition is now inspectable (it was greyed out before) and it shows the expression result is false. Any ideas? 

 

66A45717-73AB-4F45-B7D5-9E1E2568AFC7.jpeg

New Member

I’ve sussed it! The input date (Next_work_due) didn’t need formatting, whereas the utcNow() did. 

Thanks to all who helped. 

View solution in original post

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

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!

Top Solution Authors
Users online (6,776)