Want a computed field to show whether or not a field value exists in
another table
started with this...
db.define_table(
'inventory',
Field('name'),
Field('qty', label='Quantity'),
Field('MatSize',label='Material Size'),
format = '%(name)s')
db.define_table(
'POrequest',
Field('name', 'reference requestor', label='Requestor'),
Field('JobNum', 'reference jobs', label='Job #'),
Field('description', 'text', notnull=True),
Field('InInventory', compute=lambda r: r['description'] IN
r[db.inventory.name]), <<< this row right here is what I need help with
format = '%(name)s')
trying to verify row by row in a computed field if db.POrequest.description
is in any row of db.inventory.name
help please.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
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/d/optout.