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.

Parent Duplication from Child

Featured Replies

If a certain value occurs in the child record, I need the parent of it do be duplicated, and a few fields changed. Unfortunatly I can't get over to the parent file to do this via a script. Right now i'm having to set a field that is accessible by both, and then search for it in the parent file and update. Is there an easier way?

Thanks

-j

quote:

Originally posted by nightdesigns:

If a certain value occurs in the child record,

What do you mean by occurs? Entered by a user? Calculated? Automatically entered?

quote:

I need the parent of it do be duplicated, and a few fields changed. Unfortunatly I can't get over to the parent file to do this via a script.

Why can't you use a script?

Should the child record be attached to the new parent record?

Assuming there is more than one child record per parent record (otherwise, why use a relationship?), changing the parent based on info in a child record is not a good idea. What happens if different children have values that cause the parent to change in different ways? You're screwed!

Now, if you're duplicating the "parent" record (in other words, creating a new parent for this particular child), that's OK. Assuming you're in the "child" file, create a "reverse relationship" and use that either to get to the correct parent record, or to create a new parent record.

The thing here is that you'll end up with mixed many-to-many relationships, which isn't necessarily a bad thing as long as you understand that this is what you're doing.

Unless, of course, you're changing the key field for the child record in question, which can lead to a whole new can of worms.

********************

Suggestion: Rethink exactly what you where you want to go, then figure out the route.

  • Author

quote:

Originally posted by danjacoby:

Assuming there is more than one child record per parent record (otherwise, why use a relationship?), changing the parent based on info in a child record is not a good idea. What happens if different children have values that cause the parent to change in different ways? You're screwed!

Now, if you're duplicating the "parent" record (in other words, creating a new parent for this particular child), that's OK. Assuming you're in the "child" file, create a "reverse relationship" and use that either to get to the correct parent record, or to create a new parent record.

The thing here is that you'll end up with mixed many-to-many relationships, which isn't necessarily a bad thing as long as you understand that this is what you're doing.

Unless, of course, you're changing the key field for the child record in question, which can lead to a whole new can of worms.

********************

Suggestion: Rethink exactly what you where you want to go, then figure out the route.

You're heading in the right direction of what i'm trying to do. I have many children assigned to a single parent. Each child is really an e-mail. And if an e-mail says simply "I didn't sell," then to set the parent as the transaction is complete. But i want to start a new parent with some of the same info as the old one (title, description, etc, but new ID number and no children. So the parent is duplicated, the ID number is tossed for the time being until a new one is assigned, and it doesn't have any children. If you can make sense of all this. Thanks.

Based on your revised description, this should be no problem. Just GTRR (go to related record) from the child to the parent. Now duplicate the parent. If the key field is an auto-entered serial number, you'll be left with a duplicate of the parent, but with no children, just as you wanted. In any case, you can just have a script in the parent file that sets certain fields as needed. So you would have your script in the child file first GTRR, then perform external script (the one in the parent file).

  • Author

quote:

Originally posted by Fitch:

Based on your revised description, this should be no problem. Just GTRR (go to related record) from the child to the parent. Now duplicate the parent. If the key field is an auto-entered serial number, you'll be left with a duplicate of the parent, but with no children, just as you wanted. In any case, you can just have a script in the parent file that sets certain fields as needed. So you would have your script in the child file first GTRR, then perform external script (the one in the parent file).

Unfortunatly I have something like that (show related, run this script externally (from the parent file for the parent file)), but it doesn't work. FM doesn't seem to want to go to a related record while executing a script. Am i doing something wrong?

Thanks

-j

Create an account or sign in to comment

Important Information

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

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.