I want user to:

   1. search "Suggestion" table along with its linked table "Idea". Once 
   they select one specific Suggestion record (linked to specific "Idea" 
   record):
   2. FOR TABLE "IDEA": copy field "ideaTitle" from table "Idea" (old 
   selected record) and paste it into a new record in table "Idea" with a new 
   (incremented from parent ObjectSupertype) number for field "objectID" 
   3. FOR TABLE "PROPOSAL": copy the new "ideaID" from table "Idea", and 
   the new "objectID" from parent table "ObjectSuperType"
   

To summarize:


   1. parent table ObjectSuperType increments twice, i.e., creates two new 
   ID numbers, one for the new record in "Proposal" table and a different one 
   for the new record in "Idea" table.  
   2. The new record in "Idea" table copies field "ideaTitle" from the old, 
   selected-by-user record in "Idea" table (plus it gets a new objectID). 
   3. The new record in "Proposal" table gets the related "ideaID" number 
   that links it to the new "Idea" table record, and a new "objectID" number 
   from table "ObjectSuperType" that is different than the "objectID" field in 
   the "Idea" table" 
   

Any example would be deeply appreciated!

db.define_table('ObjectSuperType',  ## Super-type over Party and 
components.  Can be person, organization, project, program, business 
process, anything.
    Field('objectdisplayName','string', label='Object Name'))


db.define_table('Suggestion', 
Field('ideaID', 'reference Idea',label='Suggestion Idea ID'))


db.define_table('Idea',
Field('ideaTitle','string', length=140, comment='140 characters max'),
Field('objectID', 'reference ObjectSuperType'))


db.define_table('Proposal',Field('suggestionID','reference Suggestion'), ## 
can be null
Field('ideaID', 'reference Idea',label='Proposal Idea ID'), 
Field('objectID', 'reference ObjectSuperType'))



Alex Glaros

-- 

--- 
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/groups/opt_out.


Reply via email to