OOPS , not as i wanted.
It works to create records but to edit records it does not
Editing records using admin, there is not request.vars.emp and my list
field is empty.
Any ideas?
2013/9/11 António Ramos
> I have the company id in my request.vars.emp variable
>
> So its easy
>
> IS_IN_DB(db
I have the company id in my request.vars.emp variable
So its easy
IS_IN_DB(db(db.trabalhador.company==request.vars.emp),
It works
the request variable is amazingly powerfull
thank you
2013/9/11 Anthony
> On Wednesday, September 11, 2013 7:22:36 AM UTC-4, viniciusban wrote:
>
>>
On Wednesday, September 11, 2013 7:22:36 AM UTC-4, viniciusban wrote:
> 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.
>
That will work if you know the company id before the form is served, but if
the company
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 wrote:
> Hello
>
> i have a 3
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
5 matches
Mail list logo