merkaba22 Posted March 8, 2005 Author Posted March 8, 2005 File 1: Record number -- auto serialized Portal w/ item field, type field, qty field File 2: Record number Item Type Qty Relationship record number =:: record number; allow creation of related records works great -- but when I try to duplicate a record in File 1, no portal data is duplicated in new records in File 2. Is there a way to have a duplicate record (with new record number) that includes the portal data from the previous record?
merkaba22 Posted March 8, 2005 Posted March 8, 2005 File 1: Record number -- auto serialized Portal w/ item field, type field, qty field File 2: Record number Item Type Qty Relationship record number =:: record number; allow creation of related records works great -- but when I try to duplicate a record in File 1, no portal data is duplicated in new records in File 2. Is there a way to have a duplicate record (with new record number) that includes the portal data from the previous record?
merkaba22 Posted March 8, 2005 Author Posted March 8, 2005 File 1: Record number -- auto serialized Portal w/ item field, type field, qty field File 2: Record number Item Type Qty Relationship record number =:: record number; allow creation of related records works great -- but when I try to duplicate a record in File 1, no portal data is duplicated in new records in File 2. Is there a way to have a duplicate record (with new record number) that includes the portal data from the previous record?
mr_vodka Posted March 8, 2005 Posted March 8, 2005 When you create a duplicate record, the auto serial number in File2 is different from the original File1. Therefore, via the relationship, no corresponding records in File2, match the Record number key. Unless you want to recreate all the records associated with RecordID number in file2, then you should pick another key to match on besides the unique RecordID number. Maybe you can have a key that when it is a new record, can be a calculated lookup of the RecordID number, but when a duplicate record script is run, it changes the key field into the key of the original record prior to duplication.
mr_vodka Posted March 8, 2005 Posted March 8, 2005 When you create a duplicate record, the auto serial number in File2 is different from the original File1. Therefore, via the relationship, no corresponding records in File2, match the Record number key. Unless you want to recreate all the records associated with RecordID number in file2, then you should pick another key to match on besides the unique RecordID number. Maybe you can have a key that when it is a new record, can be a calculated lookup of the RecordID number, but when a duplicate record script is run, it changes the key field into the key of the original record prior to duplication.
mr_vodka Posted March 8, 2005 Posted March 8, 2005 When you create a duplicate record, the auto serial number in File2 is different from the original File1. Therefore, via the relationship, no corresponding records in File2, match the Record number key. Unless you want to recreate all the records associated with RecordID number in file2, then you should pick another key to match on besides the unique RecordID number. Maybe you can have a key that when it is a new record, can be a calculated lookup of the RecordID number, but when a duplicate record script is run, it changes the key field into the key of the original record prior to duplication.
merkaba22 Posted March 8, 2005 Author Posted March 8, 2005 Hey thanks! I appreciate all the help I get here:) To be clear, I understood the first part -- the second part is a bit abstract for me; a more concrete solution is what I was looking for, a "for example" .... thanks
merkaba22 Posted March 8, 2005 Author Posted March 8, 2005 Hey thanks! I appreciate all the help I get here:) To be clear, I understood the first part -- the second part is a bit abstract for me; a more concrete solution is what I was looking for, a "for example" .... thanks
merkaba22 Posted March 8, 2005 Author Posted March 8, 2005 Hey thanks! I appreciate all the help I get here:) To be clear, I understood the first part -- the second part is a bit abstract for me; a more concrete solution is what I was looking for, a "for example" .... thanks
mr_vodka Posted March 8, 2005 Posted March 8, 2005 I quickly made a mock test file. However, you have to understand that by doing this, both record 2 and record 4 would have access to change the related info in the portal. In other words, if you change it on record 2, record 4 would reflect the changes as well. Is this what you are trying to achieve? If not, then duplicate portal records would have to be created for each time the user wants to duplicate the record.
mr_vodka Posted March 8, 2005 Posted March 8, 2005 I quickly made a mock test file. However, you have to understand that by doing this, both record 2 and record 4 would have access to change the related info in the portal. In other words, if you change it on record 2, record 4 would reflect the changes as well. Is this what you are trying to achieve? If not, then duplicate portal records would have to be created for each time the user wants to duplicate the record.
mr_vodka Posted March 8, 2005 Posted March 8, 2005 I quickly made a mock test file. However, you have to understand that by doing this, both record 2 and record 4 would have access to change the related info in the portal. In other words, if you change it on record 2, record 4 would reflect the changes as well. Is this what you are trying to achieve? If not, then duplicate portal records would have to be created for each time the user wants to duplicate the record. test2.zip
merkaba22 Posted March 9, 2005 Author Posted March 9, 2005 I kinda know how to do that -- what I want to achieve here is that any record could be duplicated with corresponding records created in File 2 so that when I change the duplicate record the original remains unchanged.... Oh yea, I am working FM 6 -- thanks, I appreciate it.
merkaba22 Posted March 9, 2005 Author Posted March 9, 2005 I kinda know how to do that -- what I want to achieve here is that any record could be duplicated with corresponding records created in File 2 so that when I change the duplicate record the original remains unchanged.... Oh yea, I am working FM 6 -- thanks, I appreciate it.
merkaba22 Posted March 9, 2005 Author Posted March 9, 2005 I kinda know how to do that -- what I want to achieve here is that any record could be duplicated with corresponding records created in File 2 so that when I change the duplicate record the original remains unchanged.... Oh yea, I am working FM 6 -- thanks, I appreciate it.
mr_vodka Posted March 9, 2005 Posted March 9, 2005 If you want to duplicate all the related records, then one method you can use is the generate the related files into a temp file and then import them into the main File2 table/file. Again, I did a quick mockup for you in FM6. When incorporating it into your program, make sure that you map the Import fields correctly. Good luck.
mr_vodka Posted March 9, 2005 Posted March 9, 2005 If you want to duplicate all the related records, then one method you can use is the generate the related files into a temp file and then import them into the main File2 table/file. Again, I did a quick mockup for you in FM6. When incorporating it into your program, make sure that you map the Import fields correctly. Good luck.
mr_vodka Posted March 9, 2005 Posted March 9, 2005 If you want to duplicate all the related records, then one method you can use is the generate the related files into a temp file and then import them into the main File2 table/file. Again, I did a quick mockup for you in FM6. When incorporating it into your program, make sure that you map the Import fields correctly. Good luck. Duplicate_Portal_Records.zip
merkaba22 Posted March 10, 2005 Author Posted March 10, 2005 Hey Mr_Vodka! Good stuff your drink from! I looked over your example and it looks very good -- thank you. I will have a chance to really get into it later on the weekend:) Thanks again -- this is great.
merkaba22 Posted March 10, 2005 Author Posted March 10, 2005 Hey Mr_Vodka! Good stuff your drink from! I looked over your example and it looks very good -- thank you. I will have a chance to really get into it later on the weekend:) Thanks again -- this is great.
merkaba22 Posted March 10, 2005 Author Posted March 10, 2005 Hey Mr_Vodka! Good stuff your drink from! I looked over your example and it looks very good -- thank you. I will have a chance to really get into it later on the weekend:) Thanks again -- this is great.
bruceR Posted March 12, 2005 Posted March 12, 2005 Merk: you're on a Mac. Vodka is on a PC. He's making it way too hard. It can be done in a simple applescript, which can essentially copy and paste the entire record with related data in one action. See attached. You just need a layout that does not contain the record ID and does not contain any calc fields. You use the following applescript inside your Filemaker script. The example shows how, it is lightning fast, and does not require any scripting in the item file. copy every cell of current record to temp create new record with data temp go to result
bruceR Posted March 12, 2005 Posted March 12, 2005 Merk: you're on a Mac. Vodka is on a PC. He's making it way too hard. It can be done in a simple applescript, which can essentially copy and paste the entire record with related data in one action. See attached. You just need a layout that does not contain the record ID and does not contain any calc fields. You use the following applescript inside your Filemaker script. The example shows how, it is lightning fast, and does not require any scripting in the item file. copy every cell of current record to temp create new record with data temp go to result
bruceR Posted March 12, 2005 Posted March 12, 2005 Merk: you're on a Mac. Vodka is on a PC. He's making it way too hard. It can be done in a simple applescript, which can essentially copy and paste the entire record with related data in one action. See attached. You just need a layout that does not contain the record ID and does not contain any calc fields. You use the following applescript inside your Filemaker script. The example shows how, it is lightning fast, and does not require any scripting in the item file. copy every cell of current record to temp create new record with data temp go to result Archive.zip
Jalz Posted March 12, 2005 Posted March 12, 2005 Hi Merkaba22 There is a good resource website http://www.databasepros.com/resources.html, where you can do a search for duplicate portal. There is an example file you can download and learn from. I use this technique in my solution and works quite well, and is quite easy to understand. HTH
Jalz Posted March 12, 2005 Posted March 12, 2005 Hi Merkaba22 There is a good resource website http://www.databasepros.com/resources.html, where you can do a search for duplicate portal. There is an example file you can download and learn from. I use this technique in my solution and works quite well, and is quite easy to understand. HTH
Jalz Posted March 12, 2005 Posted March 12, 2005 Hi Merkaba22 There is a good resource website http://www.databasepros.com/resources.html, where you can do a search for duplicate portal. There is an example file you can download and learn from. I use this technique in my solution and works quite well, and is quite easy to understand. HTH
merkaba22 Posted March 15, 2005 Author Posted March 15, 2005 Thanks for the tip BruceR -- I was having way too much trouble with this yesterday ... It was complicated by lookups based on a relationship being intermittant:( I will check this out tomorrow:)
merkaba22 Posted March 15, 2005 Author Posted March 15, 2005 Thanks for the tip BruceR -- I was having way too much trouble with this yesterday ... It was complicated by lookups based on a relationship being intermittant:( I will check this out tomorrow:)
merkaba22 Posted March 15, 2005 Author Posted March 15, 2005 Thanks for the tip BruceR -- I was having way too much trouble with this yesterday ... It was complicated by lookups based on a relationship being intermittant:( I will check this out tomorrow:)
merkaba22 Posted March 20, 2005 Author Posted March 20, 2005 Hi BruceR! I was trying to adapt your excellent example to my current database -- I think I did everything right but I am getting an error message: "write access denied (error -10006)" and the script fails. I have enclosed a portion of my DB if you would like to review it. I am really stuck now -- 'cause I really don;t knopw codes and don;t see where I have missed in my adaption or your great example -- help:)!!!
merkaba22 Posted March 20, 2005 Author Posted March 20, 2005 Hi BruceR! I was trying to adapt your excellent example to my current database -- I think I did everything right but I am getting an error message: "write access denied (error -10006)" and the script fails. I have enclosed a portion of my DB if you would like to review it. I am really stuck now -- 'cause I really don;t knopw codes and don;t see where I have missed in my adaption or your great example -- help:)!!!
Søren Dyhr Posted March 21, 2005 Posted March 21, 2005 Hi Geoffrey I would guess - since your upload is wonky, that you havn't set the "Allow creation of related records" on the portal in question. --sd
Søren Dyhr Posted March 21, 2005 Posted March 21, 2005 Hi Geoffrey I would guess - since your upload is wonky, that you havn't set the "Allow creation of related records" on the portal in question. --sd
merkaba22 Posted March 21, 2005 Author Posted March 21, 2005 Hey Soren -- great to hear from you this way -- what's that about my "upload" -- I am laughing! Thanks (for everything), I am learning all the time:)
Recommended Posts
This topic is 7185 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