Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

I want to change the relationship in a file. it means creating new fiels in both the parent and child records. Does anyone know of an automatic way to get the related files to take on the the new related ID? thanks

Posted

You will use your existing relationship, John.

1) Create a field in Main called TempID and reserialize your existing table using this field. Be sure to show all records first. Relationships (in 7) work both directions so that is all you will need (skip to 2). For < 7, you would need a reverse relationship to connect your related MainID back to Main MainID.

2) Create a field (TempID) in your related to hold your new MainID then use a looping Set Field (or Replace Contents) as:

Set Field [ Related::TempID; Main::TempID ]

Once correct (you can check it be creating a temp relationship on these temp fields) and checking the results, run through both files, setting the ID with the temp. Always back up first regardless. And be sure to reset your Auto-Enter next serial values. If planned for, this will be a rarity; however, sometimes you will convert a solution with improper IDs and knowing how to reassign keys is valuable.

This topic is 7509 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.