Skip to main content

Notifications

Community site session details

Community site session details

Session Id : tMapfR9hdDJ55D1381E9q8
Power Automate - Building Flows
Answered

The function was invoked with values of type 'Null' and 'String' that do not match.'.

Like (0) ShareShare
ReportReport
Posted on 11 Sep 2023 18:50:35 by 909 Super User 2024 Season 1

Hi,

 

I am trying to compare my date with todays date. but I am getting the error :

 

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

 

wonka1234_2-1694458174524.png

wonka1234_1-1694458107520.png

 

update item if successful - 

wonka1234_3-1694458190604.png

 

 

how can i fix this?

 

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on 13 Sep 2023 at 01:49:30
    Re: The function was invoked with values of type 'Null' and 'String' that do not match.'.

    HI @wonka1234,

    Do you have null value in this date field?

    If so, you need to modify your expression as below:

     if(equals(item()?['ConclusionDate'],null),'N/A',item()?['ConclusionDate'])

    Note that this expression should be on the left part of the condition to replace with the previous ConclusionDate dynamic content.

     

  • wonka1234 Profile Picture
    909 Super User 2024 Season 1 on 12 Sep 2023 at 13:04:06
    Re: The function was invoked with values of type 'Null' and 'String' that do not match.'.

    @v-qiaqi-msft  getting error on a true result - 

     

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

  • v-qiaqi@microsoft.com Profile Picture
    on 12 Sep 2023 at 02:47:54
    Re: The function was invoked with values of type 'Null' and 'String' that do not match.'.

    Hi @wonka1234,

    There is no need to format ConclusionDate.

    I think you should configure your condition as below:

    vqiaqimsft_0-1694486797141.png

     

  • wonka1234 Profile Picture
    909 Super User 2024 Season 1 on 11 Sep 2023 at 21:38:09
    Re: The function was invoked with values of type 'Null' and 'String' that do not match.'.

    @David_MA

     

    im trying both 

     

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

    and my list format is this - 

    wonka1234_1-1694468346534.png

     

     

    my error is -

     

    Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'In function 'formatDateTime', the value provided for date time string 'ConclusionDate' was not valid. The datetime string must match ISO 8601 format.'.

  • David_MA Profile Picture
    10,751 Super User 2025 Season 1 on 11 Sep 2023 at 19:06:14
    Re: The function was invoked with values of type 'Null' and 'String' that do not match.'.

    Conditions require the date to be formatted in ISO 8601 format. You can use this expression to convert the current UTC time to this format:

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

    The error also indicates your date field is null, so you may need to add an additional condition where the field is not empty.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,731 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,075 Most Valuable Professional

Leaderboard
Loading started