PDA

View Full Version : How to display null values in choices



jannes
2015-01-05, 10:18
A listbox doesn't show an empty row when browsing through data.

The last entered choice is displayed on every row with a null value.


Choices : SELECT omschrijving FROM titel ORDER BY omschrijving
Getdatamapping : keylookup("titel", "titel", nvl("{}","$%"), omschrijving)
Setdatamapping : keylookup("titel", "omschrijving", "{}", titel)

This does work :
Getdatamapping : keylookup("titel", "titel", nvl("{}","$%"), omschrijving, "<empty>")
But we don't want to display "<empty>", an empty field (spaces) should be displayed.

This doesn't work either :
Getdatamapping : keylookup("titel", "titel", nvl("{}","$%"), omschrijving, "")
Getdatamapping : keylookup("titel", "titel", nvl("{}","$%"), omschrijving, " ")
Getdatamapping : keylookup("titel", "titel", nvl("{}","$%"), omschrijving, chr(32))

barrymavin
2015-01-05, 10:37
Choicelists had an enhancement added to them so that if the SQL SELECT started with a + then a blank entry was added as the first entry in the list.

It sounds like that was not added to the listbox. Please submit an ER that being the case.

jannes
2015-01-05, 15:59
Thnx.

Do you mean :
SELECT + omschrijving FROM titel ORDER BY omschrijving

or

+ SELECT omschrijving FROM titel ORDER BY omschrijving

barrymavin
2015-01-05, 19:40
The second one.

+SELECT ...

jannes
2015-01-06, 11:42
Thnx, it works OK.