Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Listbox

Hello Experts

I have a listbox which shows all the values that are in my table exept for empty field. Is it possible to show the empty fields in the listbox, too? I would like to select the datasets that contain no values in this table through the listbox...

Thank you for your help!

18 Replies
Not applicable
Author

Hi Heinrich,

Unfortunataly not. You will have to assign a "value" to the blanks inside the script to be able to select them.

For instance assign the word "NULL" to all the nulls and blanks and then you will be able to select them.

Regards,
Marius

alexandros17
Partner - Champion III
Partner - Champion III

in your list box at the end of the listed fields there is an item "Expression", click and write

=If(IsNull(myfield) or Trim(myfield)='','---', myfield)

Anonymous
Not applicable
Author

Hi,

You cannot show NULL value in the list object. You need to cast them as a "NULL" or "NA" to show in the list box. Below script may help you to achieve this.

NullAsValue FieldName;

Set NullValue='NA'

Not applicable
Author

in you script you have to wirte:

if(isnull(myfield)=-1,'-',myfield) as FieldName

that means if you field is null you will set the value - and otherwise the regular value. if you do this you will find the - in your listbox.

regards,

MT

Not applicable
Author

Hi Satyadev

Thank you for your help

Do I have to connect it to a load statement? Like this? (The values in the table I am interested in are in 'Jobkriterium')

load *, NullAsValue Jobkriterium;

Set NullValue='NA'

SQL SELECT bez as Jobkriterium,

    beznr as Jobkritnr,

    bezart

FROM EASY.divbez where  bezart = 9;

Best

Jan

Not applicable
Author

Hi Magdalena

Thank you for your help

I tried the following:

load *, if(isnull(Jobkriterium)=-1,'-',Jobkriterium) as Jobkriterium;

SQL SELECT bez as Jobkriterium,

    beznr as Jobkritnr,

    bezart

FROM EASY.divbez where  bezart = 9;

This did not work for me...

Not applicable
Author

maybe first load your table from the database and then try loading the table again and use the if is send you

regards,

MT

Not applicable
Author

you also have to make sure that the field is null and not empty. 😉

regards,

MT

aveeeeeee7en
Specialist III
Specialist III

Hi Jan

Use below if condition in your script:

if(len(Trim(YOUR_FIELD_NAME))>1,YOUR_FIELD_NAME,'BLANKS') AS YOUR_FIELD_NAME

and Reload the Application. Use YOUR_FIELD_NAME  List Box, there you'll see the List Box with BLANKS as values.

Hope this will work for you.

Regards

Aviral