mzimm Posted October 1, 2003 Posted October 1, 2003 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!
Mike D. Posted October 1, 2003 Posted October 1, 2003 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. Mike
mzimm Posted October 1, 2003 Author Posted October 1, 2003 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).
Mike D. Posted October 1, 2003 Posted October 1, 2003 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
Mike D. Posted October 1, 2003 Posted October 1, 2003 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
Mike D. Posted October 1, 2003 Posted October 1, 2003 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
BobWeaver Posted October 2, 2003 Posted October 2, 2003 Check out this thread: http://www.fmforums.com/threads/showflat.php?Cat=&Number=1463&page=0&view=collapsed&sb=5&o=186&fpart=1
Mike D. Posted October 2, 2003 Posted October 2, 2003 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
Recommended Posts
This topic is 8097 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