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

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. 

wiredupjax
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

Gingermonster42
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
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,622)