Andy Hibbs

Beware Field IDs (and thanks FMDataMigrationTool)

Discussion created by Andy Hibbs on Nov 30, 2018
Latest reply on Nov 30, 2018 by TorstenBernhard

This one caught us out again today and we thought it might be helpful to those that are not aware.

I created a test file and a couple of text fields in addition to the default v17 fields as follows:

Field IDs1.png

Hence we have field IDs 6 and 7

Using the Manage Database fields I had accidentally left TestTwo selected when I clicked the 'Create' button resulting in the following standard message.

Field IDs2.png

After spotting my error, I've created the TestThree field, however, despite no actual field being created between TestTwo and TestThree the field ID was allocated during the previous stage, with ID 8 now unavailable.

Field IDs3.png

This is the biggest challenge of the separation model (which we champion regularly), keeping the live and development data file fields in sync. If you are developing with separate data files, a field ID mismatch will result in scripts and layouts not recognising fields, or referring to or setting the incorrect field within the interface file. Not nice.

 

Mostly, we add fields to the live version and bring back copies of the updated data files to avoid the risk of mismatched field IDs. However, there are times when we've spent hours setting up test data and scenarios within the development data files that we can't afford to lose and, although we now have the data migration tool to overcome this, previously we have had to add fields to the live and development files, for which we have dedicated layouts we can drag new fields on for both systems and compare the table and field IDs.

 

It is very easy to accidentally have a field selected in the Manage Database window when clicking 'Create', but there is no going back once the mistake has been made.

 

As per the subject of this post, now we had the data migration tool to rescue us and combine the test data with the live data file or vice-versa.

 

I hope this helps someone else avoid the problem.

 

Regards

Andy

Outcomes