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 / 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:
  • Verified answer
    Mark Nanneman Profile Picture
    993 Moderator 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,725 Super User 2026 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 259 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 227 Super User 2026 Season 2

#3
Valantis Profile Picture

Valantis 134 Super User 2026 Season 2

Last 30 days Overall leaderboard