I experience the same unexpected behavior.

On Friday, October 28, 2011, szimszon wrote:

> I have to tables
>
> db.define_table( 'wdirs',
>         Field( 'name', type = 'string',
>                 requires = IS_NOT_EMPTY()),
> *(a)*     *format='%(name)s %(id)s'*
> )
>
> db.define_table( 'files',
>         Field( 'wdirs_id', db.wdirs,
>                     requires = IS_IN_DB( db, db.wdirs.id, "%(name)s
> %(id)s" ),
> *(b)*                 *represent = lambda id, row: row.wdirs_id.name*)
> )
>
> If I remove *(b)* than the SQLFORM.grid(db.files) displays only the record
> id in wdirs_id column. The wdirs' table format parameter isn't honored. I
> have to make the represent to be able to display the name of the wdir not
> only the record id.
>
> Am I right or I miss something?
>

Reply via email to