I have also constraints on database level, but this is necessary for normal 
logical consistency of the database model. The problem is for me again - 
even if i use that "reference" or "list.reference" - that i cannot have *
ONLY* these fields

book.title
author.name

in my form on the screen and *only one submit-Button*, because CRUD accepts 
only one table and so there were 2 submit-buttons and 2 CRUD.create forms. 
As i said i want to insert the book-data (for simplicity here the title) 
without clicking the submit button, then select some author (better: one or 
more authors), then click submit, and the web2py-System must then insert 
the book, look for the new book-id and insert this book-id together with 
the author-id in the
connection-table "verb". On a very low-level programming view with CGI, 
Python and informix (or just MySQL) this can be done without
great effort, but you have to write too much code. That is the reason why i 
want to have a simple form, created by CRUD or SQLFORM. 

By the way, i searched the Newsgroup here and i did'nt find anyone, who had 
this same problem. I'm wondering about that, because it is a standard 
situation in many commercial databases: you have producers and articles, 
but the connection between the two ist stored in a new table- say 
"prod_art" in form of a tupel (producer_id, article_id). How to put 

Producer-, 
Article-Data and 
informations about who produces which article (Table "prod_art")

in only one FORM with only ONE Submit Button?

P.S. Naturally i have one solution, but i think it is a dirty one: 


   1. With CRUD make 2 INSERT-Forms for tables "author" and book.
   2. If FORM for the book is accepted, and we therefor know the new 
   book_id.
   3. go to the NEXTURL, i.e. the CRUD.create - FORM for the table "verb"
   4. In the Controller, before accepting the form, let verb.book_id = 
   book_id from step 2.
   5. Choose an author from the table "verb". Thanks to this CRUD-Feature!
   6. Insert verb.

Thats all, but it is too complicated for Users, wo want to insert thousends 
of Books: 2 Screen, 2 Submit-Buttons, switching

between the screens. As in said, i build a very user-friendly solution with 
CGI, but i think, it must be done also with web2py....

Reply via email to