web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / The template language ...
Power Automate
Suggested Answer

The template language function 'lessthanOrEquals' expects two parameter of matching types

(2) ShareShare
ReportReport
Posted on by 17
Hello Community,
 
 
I’ve been working on a Power Automate flow designed to help us monitor activities related to new records created in our Dynamics 365 CRM. The goal is to automatically notify team members if there has been no activity for 2 weeks after a record is created.
 
### Flow Overview:

- Trigger : The flow triggers whenever a new record is created in Dynamics 365 CRM.
- Logic : It checks the following fields: `CreatedOn`, `Last Modified On`, and `Last Activity Date`. If no activity has occurred within 14 days, the flow sends an email notification to the team.
 
### The Issue:
While setting up the conditions to compare `CreatedOn` and `Last Modified On` fields with the expression `addDays(utcNow(), -14)`,
 
I encountered an error:

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

I would greatly appreciate any insights or suggestions from the community. 
 
Below are the Attached Photos of my flow.
 
Categories:
I have the same question (0)
  • Suggested answer
    rzaneti Profile Picture
    4,476 Super User 2026 Season 1 on at
    Hi,
     
    This error is happening because some of the values pulled from Dataverse are null, and Power Automate cannot use it to compare with a date. You can easily preventing it by just adding another condition on the top (this is important, as top conditions are read first), to test if your Dataverse column is not equal to null:
     
     
    Once Power Automate identify a column with null values, it will redirect your flow to the If no block. If you want to send these records with null values to the If yes block, you can use this design instead:
     
    - First, you must change the And operator to Or (highlighted in blue)
    - Change your is not equal to for is equal to, when testing if your Dataverse column is null. Make sure to keep this condition on the top, so it will be tested first (highlighted in red)
    - Add a new group of condition, where you will allocate your date difference tests (highlighted in orange)
    - Make sure to set the group operator to And (highlighted in green)
     
    Since you are working with Created/Modified columns, these nulls are probably coming exclusively from the Modified On column. 
     
    Let me know if it works for you or if you need any additional help!
    -------------------------------------------------------------------------
    If this is the answer for your question, please mark the post as Solved.
    If this answer helps you in any way, please give it a like.
  • Expiscornovus Profile Picture
    33,846 Most Valuable Professional on at
    Have you double checked in the outputs of the list rows action if one the date fields you are checking in the condition has an empty/null value?
     
    The error suggests this is the case.
  • CU26090958-0 Profile Picture
    17 on at
    Hi @rzaneti,
     
    Thanks for responding,
     
    I have removed the "modifiedon" and now only using "createdon" field, my flow is running but it's not going into condition part, below is my flow image
     
     
    And below is the condition that I have applied 
     
  • rzaneti Profile Picture
    4,476 Super User 2026 Season 1 on at
    Hi,
     
     
    It looks like your loops are not being executed. It usually happens when your Dataverse List Rows action doesn't return any record.
     
    Do you currently have any filters applied to your List rows action? If yes, please temporarily remove it or change it, so you can test if the flow will run as expected when some records are retrieved. 
     
    If the flow works without filters, then you can reapply them and run the flow again whenever you have enough records that match to the filters. If it doesn't, please share an image of your List rows settings.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 997

#2
Valantis Profile Picture

Valantis 810

#3
Haque Profile Picture

Haque 642

Last 30 days Overall leaderboard