Hi,
that's my model
db.define_table('report',
Field('person', 'reference auth_user',
#requires=IS_IN_DB(db, db.auth_user.id, "%(last_name)s" ), # <------
look here
),
Field('text'),)
and that's a function:
def report():
grid = SQLFORM.smartgrid(db.auth_user,
linked_tables=['report'],
user_signature = False)
return locals()
No problems with a comment in line 3.
After removing the '#' and activating line 3 my grid doesn't show the name
of the person but only the record number (the id).
Why?
I have tried:
IS_IN_DB(db, db.auth_user.id, "%(last_name)s" )
IS_IN_DB(db, db.auth_user, "%(last_name)s" )
IS_IN_DB(db, 'auth_user.id', "%(last_name)s" )
IS_IN_DB(db, db.auth_user)
Regards, Martin