In a synchronized environment, it is necessary to ensure that every table you wish to include in SyncServer services has a primary key field that uses the Get(UUID) calculation function to auto-enter a universally unique id for all records.
Many solutions are built to use the Serial Number Increment option provided in FileMaker. Serial numbers do not provide a valid means for creating primary keys because each server will create the same increment values, causing duplicates and record integrity issues.
If your solution currently uses serial increments, you need to do the following:
- Change the data type of all primary keys and secondary keys that are linked to these from type Number to Text.
- Change the auto-entry option for your primary key fields from Serial Increment to Auto-Enter Calculation using the formula: Get(UUID) and turn off the option to prevent overwriting existing values.
Note that it is not necessary to change the values of existing records from simple increments to UUIDs, as these will already (presumably) be unique. Only the definition of the field needs to be changed so that new records created at any node in your syncing environment have unique values.