Hello, I have created a grid with SQLFORM but the grid shows the country id instead of the country name. The form shows the name as expected but the grid does not. However, if I use 'reference country' it does but then I cannot leave the country empty in the account. Is there an easy way, other than using a join in the grid query, to show the country name in the grid?
Here are the table definitions: db.define_table('country', Field('code', unique=True, required=True), Field('name', required=True), auth.signature, format='%(name)s' ) db.define_table('account', Field('account_owner','reference auth_user'), Field('account_name'), Field('billing_country', requires=IS_EMPTY_OR(IS_IN_DB(db,db.country.id, '%(name)s'))), format='%(account_name)s', ) Even when using the following it does not show the country name. Field('shipping_country','reference country',requires=IS_EMPTY_OR( IS_IN_DB(db, db.country.id,'%(name)s'), null=None)), I appreciate your help. Regards, Edwin. -- --- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.