I have been trying to sort this out for a while now but can't figure out how.
If you copy/paste a field/table or anything from FileMaker to Clip Manager 5 or event Text mate, you see the XML code of that object, containing the object ID.
<Field id="6" dataType="Number" fieldType="Normal" name="T40_product_number">
<AutoEnter allowEditing="True" constant="False" furigana="False" lookup="False" calculation="False">
<Validation message="False" maxLength="False" valuelist="False" calculation="False" alwaysValidateCalculation="False" type="OnlyDuringDataEntry">
<Storage index="All" indexLanguage="French" global="False" maxRepetition="1"/>
Only the first line is interesting here, you can see the <Field id="6" witch FM uses to reference it's relations. If I just edit this number and copy the field back into FM, FileMaker changes the field id so this doesn't' work (even if I paste it in a new table, the FM will change the id to 1).
How can I somehow override the defined ID?
Here's what it's all about:
In a multiple file database solution, I am working on a new version of a given database file (eg. Products_new.fmp12). This file is hosted on fmserver with all the other files.
The fileds in tables of the original file (eg. Products.fmp12) are a data sources to the fields in other files (eg. Manufacturing.fmp12, Invoices.fmp12 etc.) There are quite many relations here so obviously, the goal is not having to recreate the relations manually when switching to the new file.
How to do it? Filemaker "builds" it's relation based on the TableIDs and FieldIDs, not table and field names. So setting the new file to the same file name, table id's & field id's should do the trick.
Now here's where trouble starts:
What I did is that I went and looked at the ID's of the tables & fields in the old solution and edited the ID's of the new solution through copy/paste into Clip Manager 5 or TextMate, edited the Field ID, copied that to the clipboard, pasted it back into FileMaker (previously deleting the original field obviously).
Here's the catch: FileMaker just changes the ID's to the next available number so if I had 100 fields in my table, my modified field will get the ID 101, no matter what ID I set before pasting it.
Ps. I started from scratch instead of a copy of the original file because the original file is the kind of file that gives you nightmares...
Thanks a lot to anybody who can help