Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Duplicating records and their related records

Featured Replies

Am i mssing something that is really simple...

I have a table that has a couple of related tables hanging off of it. There are times when a user wishes to duplicate the main table AND its related records.

I am currently using a script that duplicates the main record, remembers the new records match field and then does a 'goto related records only' step and then loops through each of the related records to duplicate them and give them the new match field!!!! It's painful, clumsy and slow!!!!

ANy ideas would be greatly appreciated.

Steve:

That's pretty much the method, unfortunately, as you've got to update all the match fields. However, it shouldn't be "painful, clumsy and slow." Because you're using GTRR, it should be fairly speedy, even in a large data file.

-Stanley

There are times when a user wishes to duplicate the main table AND its related records.

If this really often happens, then create a new Table, import the related records there, set a global to the next ParentID, and import back into the original RelatedTable substituting the ParentID with the global value when importing.

  • Author

Thanks for your answers. They will help to tidy up my script. It does seem odd however that this option has not been built into the duplicate command. Oh well.

Cheers

Steve:

I'd say that the reason duplicating related records is not built into the duplicate record command is that you don't always want to duplicate all the related records. In a job order, one related record will be the contact record, another might be the invoice, if one has been created. Duplicating these would make a mess of your data. So, it's a case of having to roll your own.

-Stanley

Note that on a Mac, it's a extremely simple. Requirement: a portal with auto-create related records turned on. A layout in the parent record that displays the portal and the parent record fields you want to copy. There should be no record ID fields and no calculated fields displayed on this layout.

If set up this way, perform applescript:

Create new record with data (get data current record)

See attached example.

AutocreatePortal.zip

  • Author

Thanks Bruce,

Unfortunately the bunch i work for do not have the superior intellect to work with the ultimate OS: panther. I am stuck developing on an XP platform. I feel dirty!!!

I wonder if there is a similar script available for Windows?

Actually I'm using Tiger but they are behind the times here and don't let you choose that as your operating system.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.