Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Null values in List Box

Hello All.

I am having some null values in my list box.

Could some body help to remove those null values from list box?

Regards,

Balraj Ahlawat

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

NULL values are never shown in list boxes. Instead, what you probably have is empty strings, or strings with blanks. I would convert these to NULLs in the script by using

     If(Len(Trim(MyField))>0,MyField) as MyField

Then they will not show up in the list box.

HIC

View solution in original post

5 Replies
hic
Former Employee
Former Employee

NULL values are never shown in list boxes. Instead, what you probably have is empty strings, or strings with blanks. I would convert these to NULLs in the script by using

     If(Len(Trim(MyField))>0,MyField) as MyField

Then they will not show up in the list box.

HIC

tresesco
MVP
MVP

Try expression, like: If(len(Trim(YourField))>0, YourField)

SunilChauhan
Champion II
Champion II


if( fieldname<>' ',Fieldname)

if(len(fieldname)>0,Fieldname) /// as henric suggeted

if(fieldname=null(),fieldName)

or if there is some null characters like .,-

then

you can use

if(fieldname<>'.',fieldname)

if(fieldname<>'-',fieldname)

hope one of them work for you

Sunil Chauhan
Anonymous
Not applicable
Author

Agreed Henric,

Its not null values, It is empty strings.

Let me try out with this expression.

Regards,

Balraj Ahlawat

Anonymous
Not applicable
Author

Thanks.

Its done.

Regards,

Balraj Ahlawat