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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Coalesce function not ...
Power Automate
Answered

Coalesce function not working within Condition Control Action

(2) ShareShare
ReportReport
Posted on by 46
Hi All,
 
We have a Flow that requires to check if a Whole Number field is greater than or equal to 0 but it fails with the subject error as its returning a Null value if no numeric value has been set for the field. Looking into this I thought I can simply use the coalesce function which works and returns a 0 within my Compose Action but when the Compose Action is used within Condition Control Action I see get the same error even though the value is set to 0 by the Coalesce Formula. Does anyone know why this is happening and how to fix it?

Error: The template language function 'lessOrEquals' expects all of its parameters to be either integer or decimal numbers. Found invalid parameter types: 'Null'
 
Formula: coalesce(outputs('Get_Company')?['body/byt_totalusers'],int(0))
 
Categories:
I have the same question (0)
  • Verified answer
    CA1105 Profile Picture
    545 Super User 2025 Season 2 on at
     
    I guess you are looking at the wrong parameters since error is saying expression is wrong for "LessOrEquals". Check value for below condition.
     
  • Adam_Travers Profile Picture
    46 on at
    Hi,
     
    Many thanks for the response. I still get the error if I change it to the below, however, if I just have a single condition using my Compose field it works.

  • Verified answer
    Adam_Travers Profile Picture
    46 on at
    Hi, I have managed to fix this so many thanks for your help.
  • David_MA Profile Picture
    12,982 Super User 2025 Season 2 on at
    According to the error message, the coalesce function is returning null. Based on the conversation, I am not sure if you updated you coalesce statement. If you haven't update it to one of these two expressions:
    1. coalesce(outputs('Get_Company')?['body/byt_totalusers'],int('0'))
    2. coalesce(outputs('Get_Company')?['body/byt_totalusers'],0)
    If you don't understand the difference from what you have:
    1. Putting the single quotes around 0 makes it a string. The int() expression is used to convert a string to an integer.
    2. Just using 0 requires no conversion since 0 is already an integer.
    I am pretty sure either should work but don't have the time to test them right now.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard