March 8, 200520 yr Author 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?
March 8, 200520 yr 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?
March 8, 200520 yr Author 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?
March 8, 200520 yr 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.
March 8, 200520 yr 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.
March 8, 200520 yr 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.
March 8, 200520 yr Author 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
March 8, 200520 yr Author 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
March 8, 200520 yr Author 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
March 8, 200520 yr 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.
March 8, 200520 yr 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.
March 8, 200520 yr 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
March 9, 200520 yr Author 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.
March 9, 200520 yr Author 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.
March 9, 200520 yr Author 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.
March 9, 200520 yr 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.
March 9, 200520 yr 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.
March 9, 200520 yr 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
March 10, 200520 yr Author 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.
March 10, 200520 yr Author 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.
March 10, 200520 yr Author 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.
March 12, 200520 yr 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
March 12, 200520 yr 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
March 12, 200520 yr 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
March 12, 200520 yr 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
March 12, 200520 yr 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
March 12, 200520 yr 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
March 15, 200520 yr Author 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:)
March 15, 200520 yr Author 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:)
March 15, 200520 yr Author 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:)
March 20, 200520 yr Author 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:)!!!
March 20, 200520 yr Author 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:)!!!
March 21, 200520 yr 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
March 21, 200520 yr 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
March 21, 200520 yr Author 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:)
March 21, 200520 yr Author 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:)
March 24, 200520 yr Merk, your file is faulty and won't download. Also read my instructions, they are very specific, did you follow them? This part: You just need a layout that does not contain the record ID and does not contain any calc fields.
Create an account or sign in to comment