In validators section in the book [1], there is an example of
IS_NOT_IN_DB() using a query.
It can be done in IS_IN_DB(), too.


[1] 
http://web2py.com/books/default/chapter/29/07/forms-and-validators#Database-validators

On Wed, Sep 11, 2013 at 6:22 AM, António Ramos <ramstei...@gmail.com> wrote:
> Hello
>
> i have a 3 tables
>
> Companies
> Workers
> Equipments
>
> Each company has workers and equipments.
> Some equipments are driven by one or more workers of that company.
>
>
> however this line in the table equipments
> Field('field1',db.workers)
> shows in the form all workers of all companies.
>
> How do i filter Field 1 to show only workers of the specific company?
>
> Thank you
> António
>
> --
> 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 web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to