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

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

Recommended Posts

Posted

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?

Posted

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?

Posted

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?

Posted

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.

Posted

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.

Posted

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.

Posted

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

Posted

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

Posted

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

Posted

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.

Posted

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.

Posted

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

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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

Posted

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.

Posted

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.

Posted

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.

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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:)

Posted

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:)

Posted

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:)

Posted

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:)!!!

Posted

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:)!!!

Posted

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

Posted

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

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 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.