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 / 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 Moderator 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
    14,618 Super User 2026 Season 1 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

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 791

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 535

Last 30 days Overall leaderboard