Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
sandeepprasad_j
Creator
Creator

Removing the Null Values from the text box

HI Experts,

     The null values are being displayed in the text boxes and i am trying to use the expression below in the Field expression

      Think there are associated data with the null values in the other list boxes. Not sure this is affecting the following expression.

     if (Len(field) > 0, Field)

But it is not solving my issue .

Can u please help me out in solving this issue .

Thanks,

Sandeep.

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

NULLs are never displayed in a list box. But blanks and empty strings are.

You probably have some white space (blanks, tabs, hard spaces, etc.) so that it is not zero length. Try

     If(Len(Trim(Field))>0,Field)

or

     If(Len(Purgechar(Field, chr(32) & chr(160)))>0,Field)

HIC

View solution in original post

5 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Your expression returns a null if the length of the field is 0. So in those cases you are not removing nulls. You can replace them with zero-length strings if you want: if(Len(field) > 0, Field,'')


talk is cheap, supply exceeds demand
nilesh_gangurde
Partner - Specialist
Partner - Specialist

Hii Sandeep,

You can use the below mentioned expression:

if(wildmatch(field,'') or len(field) = 0 or isnull(field),null(),field)

or if you want display the null value you can go with:

if(wildmatch(field,'') or len(field) = 0 or isnull(field),'Null',field)

-Nilesh

sandeepprasad_j
Creator
Creator
Author

Hi Gysber,

     Thanks for the reply but ,the expression u have give is not solving my issue ... Can u please help me out ...Sorry i had said text box .. but it is listbox .

Below is the Screenshot .. and 'Yellow' colour is the Null value being displayed .

Thanks,

Sandeep.

hic
Former Employee
Former Employee

NULLs are never displayed in a list box. But blanks and empty strings are.

You probably have some white space (blanks, tabs, hard spaces, etc.) so that it is not zero length. Try

     If(Len(Trim(Field))>0,Field)

or

     If(Len(Purgechar(Field, chr(32) & chr(160)))>0,Field)

HIC

sandeepprasad_j
Creator
Creator
Author

Hi Henric ,

Thanks for the reply .. I was exactly looking in to this ,wat u have mentioned ... thanks a lot

Sandeep.