I defined the folowing function:
#####
def getOptions(label, table):
return [(-1, 'Select %s' % (label))] +\
sorted([(entry.id, str(entry)) for entry in table.select()],
key = operator.itemgetter(1))
#####
I can be used with:
#####
owner = SingleSelectField(label = ownerLabel,
options = getOptions(ownerLabel, Owner)
default = 1)
#####
In this way the select field starts with an entry that tells to select
a value. And after that it has on ordered list off all the values of
the foreign key.
I hope it is usefull for someone.
--
Cecil Westerhof