The error is that the field stays blank and doesn't display any choices.
## ---------------------------------
db.define_table('ObjectSuperType', ## Lookup table
Field('objectDisplayName','string', label='Object Name'),
format='%(objectDisplayName)s')
## ---------------------------------
db.define_table('Interoperability', ## Parent table. This connects
different already-existing objectIDs.
Field('shortInteroperabilityTitle', 'string'))
## ---------------------------------
db.define_table('InteroperabilityDetail', ## Child table. This is where the
world can identify components under a interoperabilityID (1:M) so that
ideas are crowdsourced from everywhere.
Field('interoperabilityID', 'reference Interoperability'),
Field('objectID', 'reference ObjectSuperType'))
## ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
db.InteroperabilityDetail.objectID.widget =
SQLFORM.widgets.autocomplete(request, db.ObjectSuperType.objectDisplayName,
id_field=db.ObjectSuperType.id)
db.InteroperabilityDetail.interoperabilityID.requires = IS_IN_DB(db,
'Interoperability.id', '%(shortInteroperabilityTitle)s',zero=T('choose
one'))
db.InteroperabilityDetail.interoperabilityID.represent = lambda id,row:
db.Interoperability(id).shortInteroperabilityTitle
##db.InteroperabilityDetail.objectID.requires = IS_IN_DB(db,
'ObjectSuperType.id', '%(objectDisplayName)s',zero=T('choose one')) ##Does
this line interfere with autocomplete?
##db.InteroperabilityDetail.objectID.represent = lambda id,row:
db.ObjectSuperType(id).objectDisplayName
Thanks,
Alex Glaros
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.