cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Meneghino
Community Champion
Community Champion

How to differentiate between zero-length string and null in data source?

IsBlank("") returns true, so how can we differentiate between "" and NULL in a data source text field?

Many thanks for any input.

 

PS If you have similar issues, please vote up this idea:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/Function-to-produce-blank-value/idi-p/14353

 

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User III
Super User III

Hi @Meneghino,

 

I notice that the CountA function enables you to count non null values.

 

With my SQL Server data source, I'm able to distinguish between blank and null values using syntax that looks like this:

 

CountA(Table({NullTest: <StringToCheck>})

 

Maybe you could try something similar?

 

Capture1.PNG

View solution in original post

3 REPLIES 3
timl
Super User III
Super User III

Hi @Meneghino,

 

I notice that the CountA function enables you to count non null values.

 

With my SQL Server data source, I'm able to distinguish between blank and null values using syntax that looks like this:

 

CountA(Table({NullTest: <StringToCheck>})

 

Maybe you could try something similar?

 

Capture1.PNG

View solution in original post

Meneghino
Community Champion
Community Champion

Thank you @timl

Very impressive, wish I could give you more kudos.

Pity that we have to do these things with work-arounds though...

Glad you found that useful! Yes, it's a pity about having to use these work-arounds.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (21,222)