This topic is locked

Empty lines in picklists

2/13/2006 2:56:53 PM
PHPRunner General questions
D
Dale author

I couldnt for the life of me understand why some of my picklists looked great and others had empty lines in the picklist.
Working with one today, I believe the blank lines come from items that were items from a table that I was excluding from the picklist.
I have an inventory table, with a field in the table for a flag named discontinued.

In the lookup wizard I have defined the picklist to this inventory table to ignore the discontinued items.
So when my picklist is built, the empty rows correspond to the items in the inventory flagged as discontinued.
Does anyone know what code should could be altered for the picklist to skip these empty lines.

D
Dale author 2/13/2006

To add to the above issue, this is happening because I am also using the concat(name,' ',brand)

Therefore the picklist routine is picking up on the 5 empty spaces. The easy solution would be to add something like " | " instead of just spaces. Sometimes the brand is not populated and I do not want a lingering marker.
I nice feature would be able to display the picklists using concat() to be able to display the fields in nice columns.
Hope this helps. Is there something I can do for a workaround.

admin 2/14/2006

Dale,
you can use Wherebox to filter records from lookup table.

It's located on Edit format dialog on Formattingtab in PHPRunner.
I.e. enter the following expression there:

"name is not null and name<>'' and brand is not null and brand<>''"



Don't forget about quotes surrounding the whole expression.

D
Dale author 2/14/2006

PERFECT
Thanks for the pointer. Finally got it working using
concat_ws(' ',name,' ',brand) "
in the custom expression. Comes down the the NULL. using the concat(name,' ',brand) was the culprit to produce the empty lines. If any of the expression resolves to NULL then the whole thing is considered a NULL and poof the empty lines in the picklist.
by using the concat_ws function, it all works fine.
Thanks again for your support.