johnf wrote:
> On Monday 18 August 2008 09:34:48 am Uwe Grauer wrote:
>> johnf wrote:
>>> On Monday 18 August 2008 09:18:46 am Uwe Grauer wrote:
>>>> Yes, as long as you do not set the underlying database fields to a
>>>> different default value.
>>>> I'm using "-/-" as my value for a unset field.
>>>>
>>>> Uwe
>>> Uwe
>>> I not sure why this has to be done?  Is it to avoid the "not in the list"
>>> error?  Or are you attempting to avoid something else?
>> I remember that we had a discussion about how to handle NULL values in
>> dropdown lists.
>> The conclusion was to provide a string for the value 0.
>>
>> Uwe
> 
> But how are you avoiding the problem with "-/-"?  Maybe, a little code might 
> help - thanks.  To be honest I have been avoiding the Dropdown for all but 
> static lists.
> 
> 

I get the key, value pairs from database tables.
To be able to unset the selected dropdown value, you have to provide
something for the value 0.

I just add this to all my lists:
# set names, keys from database tables
names.insert(0, "-/-")
keys.insert(0, Decimal(0))
return (names, keys)

Uwe


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to