Have you tried removing the last , after the IS_IN_DB()?

On Wed, Jan 18, 2012 at 7:05 AM, Martin Weissenboeck <[email protected]>wrote:

> 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
>



-- 
-- 
Regards,
Bruce Wade
http://ca.linkedin.com/in/brucelwade
http://www.wadecybertech.com
http://www.warplydesigned.com
http://www.fitnessfriendsfinder.com

Reply via email to