IS_IN_DB and SQLFORM edition

16 views
Skip to first unread message

Diego Tostes

unread,
Jun 13, 2018, 5:35:37 PM6/13/18
to web...@googlegroups.com
Hi,


i have a table and i am using:

Show_Room.product_id.requires = IS_IN_DB(db(Product), 'product.ref', '%(client_name)s - ref: %(ref)s')

When i am using SQLFORM to edit a line of my table, the already persisted product_id is not selected and i have to select again. If i do not select the product id again i am get the error:

Value not in database

How can i fix this to the SQLFORM mount a form with the already persisted values filled?

Rgds

Diego

Anthony

unread,
Jun 13, 2018, 6:02:13 PM6/13/18
to web2py-users
Please show you code and an example record. Is the existing value of product_id one that is no longer in the product.ref field?

Anthony
Reply all
Reply to author
Forward
0 new messages