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 function ...
Power Automate
Unanswered

The template function 'IfError' is not defined or not valid.'.

(1) ShareShare
ReportReport
Posted on by 20

I'm trying to use the IfError function:

Error, IfError, IsError, and IsBlankOrError functions - Power Platform | Microsoft Learn

It's quite unclear to me what I should enable since I don't see anything related:

federicoeulu_0-1720786571214.png

I cannot find that feature in Power Automate. I could only find it in my Power App that contains my Flow. Should I do something to enable it? Thanks.

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,768 Most Valuable Professional on at

    Hi @federico-eu-lu,


    IfError is an PowerFx function. Power Automate cloud flows use a different expression language. That expression language doesn't have an IfError function.

     

    You can find the list of functions over here:

    https://aka.ms/logicexpressions

     

  • federico-eu-lu Profile Picture
    20 on at

    Any suggestion on how can I do a try-catch then? Or How can I validate if it's null? I have tried so far:

    • Add it in a scope fails.
    • Move the item to a variable since it can be null or an integer, so, I store it on an object, but it fails to cast it later.
    • Try to validate if it's null and then try to cast it fails.
    • Try to use the IfError fails.

    So, I cannot find any efficient way to make it work. I need just something simple, if the formula fails because it can return a null from the previous operation, it should be able to skip or use the previously stored value. Thanks.

  • Expiscornovus Profile Picture
    33,768 Most Valuable Professional on at

    Hi @federico-eu-lu,

     

    You could for example use an empty or a coalesce function and combine it with an if function. Even a length function should be possible. 

  • federico-eu-lu Profile Picture
    20 on at

    Perhaps, I'm using the empty function wrong, but this is what I did:

    federicoeulu_0-1720790990194.png

    I just took out the part that could cause the formatting issue and the issue persists. Any idea why the new error is?

    federicoeulu_2-1720792235657.png

     

    It seems it doesn't work for nulls the empty one. The length would be strange, to be honest.

  • federico-eu-lu Profile Picture
    20 on at

    For the coalesce, I'm not sure if I used it well:

    federicoeulu_0-1720792019588.png

    But I still got a similar error, I am sending a 0?, but it's considered as a null?:

    federicoeulu_1-1720792077903.png

     

    So probably, what I'm doing is wrong?:

    coalesce(null, variables('Apps')?[items('Apply_to_each_4')?['centsys_name']], 0)
    Any idea?

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 251 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 239

#3
Expiscornovus Profile Picture

Expiscornovus 220 Most Valuable Professional

Last 30 days Overall leaderboard