AnsweredAssumed Answered

Duplicating manies of one into new records

Question asked by MikeF on Nov 30, 2011
Latest reply on Dec 5, 2011 by philmodjunk

Title

Duplicating manies of one into new records

Post

 

Need to automate duplication of one record in a one-to-many, then duplicate all records of two related “many” tables that contain the foreign key of that previous record.

Example:

Go to layout Projects

Duplicate Record/Request

… Let’s say the original ProjectID is 2, and the duplicated ProjectID is 3.

The above works perfectly, but the related portals are blank.

 

So now the script needs to go to table Revenue, “duplicate” all records that contain the foreign key 2 in field ProjectID into new records [in the same Revenue table], and make the ProjectID field 3 in those records.

Then same thing for the Expenses table.

 

Have made a few attempts at passing script parameters, but am dead in the water.

Any assistance will be greatly appreciated.

Thanks,

  Mike

Outcomes