Jump to content

Duplicate a Record with Portal Data


Chuck
 Share

This topic is 6627 days old. Please don't post here. Open a new topic instead.

Recommended Posts

This one has come up a couple of times in the last couple of weeks, so I figured it deserved a FAQ entry.

The question is, given a database with a portal into a related file, how can you duplicate a record in the parent file and bring the data over from the portal. Simply duplicating the record doesn't do the trick.

The only thing you need to add to your system is a global field in the child file which I'll call gNew_Parent_ID.

In my example scripts below, Parent_ID is a field in both files that the relationship is based on and Child is the name of the relationship in the Parent file.

In the child file, create the following script:

Unsort

Go to Record/Request/Page [ First ]

Loop

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
  • 1 month later...
  • 3 months later...
  • 1 year later...
  • 2 weeks later...

Ok, I used the script that Chuck wrote and it works great. The parent file that I want to drive this from has 3 portals to 3 separate files. Is there a way to do this for all 3 portals at the same time? What happens if I try to go to a related record that isn't there? Not all records will have related records in all 3 portals. Can I just combine all 3 scripts in the parent file to one script? I have a feeling it is going to hang the script when it tries to go to a related record that is not their. Any additional input?

Thanks!

John

Link to comment
Share on other sites

This topic is 6627 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

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