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,443 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…

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard