Duplicating manies of one into new records
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.
Go to layout Projects
… 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.