cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Meneghino
Level 10

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
Super User
Super User

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

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
Super User
Super User

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

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
Level 10

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

Thank you @timl

Very impressive, wish I could give you more kudos.

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

Super User
Super User

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

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

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,237)