Hi all!

I have this relationship:

db.define_table('tipos',
                Field('descricao'))

db.define_table('user_ponto',
                Field('user_id',db.auth_user, notnull=True, default=me,
readable=False, writable=False),
                Field('dia','datetime', default=request.now,
readable=False, writable=False),
                Field('tipo', db.tipos, notnull=True, label='Descrição'),
                Field('obs','text',label='Notas'))
db.user_ponto.tipo.requires = IS_IN_DB(db,'tipos.id','%(descricao)s')

How do I filter relationship in SQLForm?
How do I filter options of combobox of user_ponto.tipo field in SQLForm?

Exemple:
if test:
    SQLForm(db.user_ponto) # show only tipos.id==1
else
    SQLForm(db.user_ponto) # show only tipos.id>1

Thankful,

Fabiano.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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/d/optout.

Reply via email to