Sibylle Koczian wrote:
> If I insert some reasonable "nothing chosen" string at the beginning of the
> Choices and 0 at the beginning of the Keys, everything works, and for this
> example that's best anyway. But if I want one of the records of my lookup
> table to be selected as default, how do I do it?
If you want to set a default value on new records:
class MyBizobj(dabo.biz.dBizobj):
def initProperties(self):
self.DataSource = "mytable"
self.KeyField = "iid"
self.DataStructure = (
("iid", "N", True, "mytable", "iid"),
...
)
# Use the DefaultValues dict to specify default field values for new
# records. By default DefaultValues is the empty dict, meaning that
# no default values will be filled in.
self.DefaultValues['fname'] = 1 # value for the db field
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]