Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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
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)
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'
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
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
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...
maybe first load your table from the database and then try loading the table again and use the if is send you
regards,
MT
you also have to make sure that the field is null and not empty. 😉
regards,
MT
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