Hi all,

When I allow the country reference to be empty in the below table, the 
SQLFORM.grid will show the country id instead of the name. When I just use 
'reference country' it shows the country name in the grid and form but does 
not allow it to be empty. If I use a combination of both, it shows the 
country id in the grid. Is there a way to solve this other than doing a 
join in the SQLFORM grid query?

db.define_table('account',
    Field('account_name'),
    Field('billing_country', 
requires=IS_EMPTY_OR(IS_IN_DB(db,db.country.id,'%(name)s'))),
    format='%(account_name)s',
)

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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to