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 / How to handle null dat...
Power Automate
Answered

How to handle null data in Condition?

(0) ShareShare
ReportReport
Posted on by 22
Hi

I created a "Condition" to determine whether "customerId text" contains "txt" or is empty (sometimes AI builder can't get customerId from invoices). But it keeps showing the following error。
"customerId text" is from AI builder.
could you please help me with it ?
Thanks
Categories:
I have the same question (0)
  • Verified answer
    Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 on at
    To handle null errors in conditions like this, try using a coalesce function.  Coalesce goes with the first object/value you give that isn't null.
     
    coalesce(<your_string_input>,'')

    If your input is a null, the coalesce will go with the '', which is technically not a null, and it can be checked by the condition for the substring, and it will return a false.

     


  • Chriddle Profile Picture
    8,504 Super User 2025 Season 2 on at
    Just switch the order (first chek for null)

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

Liquid error: Object of type 'Adxstudio.Xrm.Web.Mvc.Liquid.EntityReferenceDrop' cannot be converted to type 'System.String'. Liquid error: Object of type 'System.Boolean' cannot be converted to type 'System.String'. Liquid error: Object of type 'System.Boolean' cannot be converted to type 'System.String'. Liquid error: Object of type 'System.Boolean' cannot be converted to type 'System.String'. trice602 392 Super User 2025 Season 2

#2
David_MA Profile Picture

Liquid error: Object of type 'Adxstudio.Xrm.Web.Mvc.Liquid.EntityReferenceDrop' cannot be converted to type 'System.String'. Liquid error: Object of type 'System.Boolean' cannot be converted to type 'System.String'. Liquid error: Object of type 'System.Boolean' cannot be converted to type 'System.String'. Liquid error: Object of type 'System.Boolean' cannot be converted to type 'System.String'. David_MA 270 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Liquid error: Object of type 'Adxstudio.Xrm.Web.Mvc.Liquid.EntityReferenceDrop' cannot be converted to type 'System.String'. Liquid error: Object of type 'System.Boolean' cannot be converted to type 'System.String'. Liquid error: Object of type 'System.Boolean' cannot be converted to type 'System.String'. Liquid error: Object of type 'System.Boolean' cannot be converted to type 'System.String'. Expiscornovus 210 Most Valuable Professional

Last 30 days Overall leaderboard