Good evening,
I'm running into a problem quite uncomfortable but I'm pretty sure there is
a fairly simple way to resolve it.
I defined the various tables within my database and put them in relation
with each other (one to many, many to many etc.).
The problem is that when I insert a new record in a table that requires me
to a field in another table, I have to specify that field in the record ID
which will be linked to the record that I am creating.
Example:
Tables: Worker & Leader
I want to specify, creating a new record in the table worker who is the
head of the worker that I am entering:
Name: BOB
Surname: DYLAN
Leader: 3 ----------------------> HOW DO I APPEAR TO A MENU 'CURTAIN FROM
WHICH CAN CHOOSE ONE OF THE LEADERS ALREADY' INCLUDED IN THE DATABASE
INSTEAD OF DOVER INSERT EXACT LEADER ID ???
Dovrò specificare qualcosa all'interno di
db.define_table('Worker',
Field('Name',requires=IS_NOT_EMPTY()),
Field('Surname',requires=IS_NOT_EMPTY()),
Field('LEADER', db.LEADER ..............................
)
?????
Thanks for any answers, it would be great if you could help me, I'm losing
a lot of time!
Best Regard and sorry for my disappointing english,
Alessandro
--
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.