Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Duplicate/Copy Information in a Portal


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

Recommended Posts

Posted

I'm using the duplicate record/request to copy the record. But I would also like to copy the information in the portal fields as well. Any ideas on how I should go about this? Thanks for any help!

Posted

The portal fields are really in the related file. If you want the same records to show up in the duplicate record, you just need to have the same value from the orginal record in the field that your relationship is based on. I'm not sure why you would want to do this. confused.gif

Mike

Posted

I will try to explain... I'm using a portal in a database to create a test request (labwork). The portal contains part #'s and item #'s. I made a button to duplicate the old request and delete the fields I want left blank (setfield ""). The number in the origional record field (relationship) was auto numbered (serial #). When the new record is created a new number is generated (cant have the same number, needs to be unique).

Posted

Ok, I understand. So now I'm assuming that you are now wanting to duplicate all the part #'s and item #'s in your other file? That seems like a lot of redundant information especially if there are a lot of parts & items for each test request. You probably would want a third file that is a join between the test request file and the parts/items file. The third file would be records of each item used by each test.

File A = Test Request

File B = Test Items

File C = Parts & Items

File B is related to File A via the Test ID

File C is related to File B via the Item/Part #

File B would have calculated fields to pull in the Part/Item description, etc and then could be displayed in the Portal in File A. This technique is known as tunneling or pipeline.

Someone else may have a different way.

Hope this makes sense, Mike

Posted

Wait, I forgot that you still need to create new records. You will need to create a script in the TestItems file to find the records associated with the current record in Test Request and loops through the found set duplicating each one and setting the Test Request ID field to the new ID from the Test Request file.

Mike

Posted

mzimm,

Here is a quick and dirty example of what I tried to describe. Keep in mind that this example is not what my normal finished products look like, it is just for you to examine the relationships and scripts.

The main file is Test Request.fp5

HTH, Mike

test request.zip

Posted

Bob,

Thanks for that link. I had forgotten about Chuck's post. When I compared his script with the one I provided in the attachment, they are pretty close.

Mike

This topic is 7724 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
×
×
  • Create New...

Important Information

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