chikanyc Posted August 31, 2007 Posted August 31, 2007 i have three databases: - RM_Songs - RM_Catalog (CD's) - RM_Catalog Items Each record in RM_Catalog contains a CD # and tracklist. The tracklist is made up of 20 or less portal records that are typed up in RM_Catalog...however, the portal records are created and store in RM_Catalog Items. Each RM_Catalog Item record contains a unique RM_Songs ID and RM_Catalog ID and tracklist # etc. WHAT I WANT TO DO BUT CANT DO: I want to create a script where I can dupliate a record in RM_Catalog (a CD) but also duplicate all of the portal records (tracklist) along with it. How do I do this? Please help! Thanks;)
bcooney Posted August 31, 2007 Posted August 31, 2007 This article should help: Duplicating a parent with their children
bcooney Posted September 1, 2007 Posted September 1, 2007 (edited) Not by my testing. Well, it's on the FM Advisor Website, and is article 18694. Basically, the technique is to: 1. Start at the parent record. 2. Create a new record in a new window and capture its ID "ID_New". Close that window so that you're back at the parent record. 2. Go to related children records. (if any, use if isvalid()). 3. Loop thru the children. a) Duplicate the child, assign its parent "ID_New" and then omit it, returning to the first child. Omit the first child. c) Next child d) Exit loop when found count = 0, you're out of children to duplicate. 4. Go to the new parent record "ID_New". Edited September 1, 2007 by Guest
Recommended Posts
This topic is 6294 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now