Skip to main content

Notifications

Power Automate - Building Flows
Answered

How to handle null data in Condition?

Posted on by 20
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
  • Chriddle Profile Picture
    Chriddle 7,056 on at
    How to handle null data in Condition?
    Just switch the order (first chek for null)
  • Verified answer
    Mark Nanneman Profile Picture
    Mark Nanneman 329 on at
    How to handle null data in Condition?
    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.

     


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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,246

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,884

Leaderboard