Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Auto hide null values in list box

Hi Guys,

I have a problem for the list box below,

In the list box have null value, how to auto hide the null value and then user just can select Mangement Expense and or OACQ

hide null value.jpg

Thanks before.

Regards,

Valdi

4 Replies
simonj
New Contributor III

Re: Auto hide null values in list box

Hi Valdi

QlikView should not display Null values in the list box selection. Could you try right clicking and exporting to excel to see if it is a space

You could fix this in the loadscript with something like :  if(Field = ' ', Null(), Field) as Field

A better solution would be to fix it in the datasource

Many Thanks

Simon

Re: Auto hide null values in list box

That's not a null value, but an empty string or a value of one or more spaces. Listboxes don't show nulls. If you want to hide it then you need to use an expressions like =if(Len(Trim([Expense Type]))>0,[Expense Type])

A better solution is to replace that value in the script with a value like '<N/A>' or '<missing>'.


talk is cheap, supply exceeds demand
Not applicable

Re: Auto hide null values in list box

Hi Gysbert,

if I write the script  =if(Len(Trim([Expense Type]))>0,[Expense Type]) in the tab sort --> expression

but still not work, the empty string cannot auto hide. just move to the bottom.

Re: Auto hide null values in list box

Yes, if you put that expression on the Sort tab you only change the sorting. That's why the tab has the name Sort. Go to the General tab and replace the field Expense Type with <expression> and then enter the expression I posted above.


talk is cheap, supply exceeds demand
Community Browser