cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
alopez222
Helper III
Helper III

Compare Date, wrong data types

I am trying to compare the date from the field MRP_Date with todays. If MRP_Date is greater then today then it will execute the actions in the yes side of the condition. However, I get an error the expected parameter needing to be a string type and that the one provided is a Null. I used the Get Item action before getting to the condition to look at the values and the MRP Date value is 2023-08-01. How do I fix this issue?

 

Some of the Flow:

alopez222_3-1648160040716.png

 

 

MRP Date Value:

alopez222_4-1648160519765.png

 

 

Error:

alopez222_2-1648159656743.png

 

 

First Date:

alopez222_1-1648159583485.png

 

 

 

Second Date:

alopez222_0-1648159576447.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
alopez222
Helper III
Helper III
3 REPLIES 3
ChristianAbata
Community Champion
Community Champion

hi @alopez222  try creating compose values and add the expressions on there. Then on condition use your compose outputs



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
abm
Super User
Super User

Hi @alopez222 

 

formatDateTime(outputs('Get_item')?['body/Start_x0020_Date'],'yyyy-MM-dd')

 

Is this date you comparing against utcNow()? The reason for the error is it is returning null value. Check the run history and see what value you are getting before the comparison.  To over come this error you could add extend the IF condition to check value is not null first then compare the dates.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
alopez222
Helper III
Helper III

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

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