How to convert NULL values from DB to ""? [message #261784] |
Tue, 20 November 2007 11:11  |
Eclipse User |
|
|
|
In a cell in a table, I want to display this:
"".concat(dataSetRow["STOREID"], " / ", params["sewingStoreNr"])
This throws a TypeError: "Can't find default value for object" if STOREID
in the query returns NULL. How do I solve that?
|
|
|
|
|
|
Re: How to convert NULL values from DB to ""? [message #262055 is a reply to message #261956] |
Mon, 26 November 2007 10:12  |
Eclipse User |
|
|
|
Originally posted by: jasonweathersby.alltel.net
Aaron,
Can you post the report?
Jason
Aaron Digulla wrote:
> Jason Weathersby wrote:
>
>>>> In a cell in a table, I want to display this:
>>>
>>>> "".concat(dataSetRow["STOREID"], " / ", params["sewingStoreNr"])
>>>
>>>> This throws a TypeError: "Can't find default value for object"
>> If this cell is in a table that returns no data for the dataset the
>> expression you have should not be throwing an exception. Where are
>> you seeing the error?
>
> In the log. The problem is that the cell is rendered but
> dataSetRow["STOREID"] is not initialized because the DB didn't return
> any rows.
>
> I tried
>
> dataSetRow["STOREID"] == undefined ? "" : dataSetRow["STOREID"]
>
> and variants thereof, but it seems that dataSetRow itself is not set up
> correctly in this case.
>
> Regards,
>
|
|
|
Powered by
FUDForum. Page generated in 0.06808 seconds