cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sebgedge
Helper I
Helper I

Less than equal to date comparison not working

Hi, 

 

I'm trying to retrieve a list of records where the go live date is less than utcnow() -14 days but i am getting the follow error message 

Unable to process template language expressions for action 'Condition' at line '1' and column '9668': 'The template language function 'lessOrEquals' expects two parameter of matching types. The function was invoked with values of type 'Null' and 'String' that do not match.'.

 

all records have a date in them I've tried with formateddate and just utcnow() but have not been able to resolve any help greatly appreciated.

 

Thanks,
Seb

1 REPLY 1
DamoBird365
Super User
Super User

Hi @sebgedge,

 

It sounds like one of the fields is empty to be honest.  Presumably you are doing something like

columnname le 'formatdatetime(adddays(utcnow(),-14),'yyyy-MM-dd')' 

 

If you remove the filter and then check the history from a previous run, you should be able to see the field and result that you are comparing against to see what you are playing with.  You can also check your date -14 expression in a compose to give you a feel for what is going wrong.

 

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

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.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Top Kudoed Authors
Users online (1,947)