I just updated all the IDs in my solution to use UUIDs due to issues I was having with duplicate IDs. I am confused about how auto-enter calculations (that replace existing values) work with MirrorSync.
My question:
How is the value in a field with an auto-enter calculation (that replaces an existing value) different when the field is specified as the primary key field in the MirrorSync configuration versus when it is not? Does the value get changed during synchronization depending on if a global field is referenced? Does having the option to evaluate the field even if the referenced fields are empty also create a difference in behavior?
Thank you very much for helping clarify this!!!
This is how I used to be creating the IDs and have now abandoned for the UUID method:
serialNumber (number) field: number field that auto-enters a serial number - the value of this field gets reset in each table by script using "GetNextSerialValue" each time a user logins and their device prefix is identified
ID (text) field: auto-enter calculation (replaces existing value) that combined the device prefix (stored in a global field) & the record serialNumber - this field was used as at the primary key as well as the user-visible record number
devicePrefix (text) field: auto-enter calculation (replaces existing value) of the left two characters of the ID field
This is how I am now setting the UUID & user-visible IDs:
no changes to field def. - serialNumber (number) field: number field that auto-enters a serial number with modifications prohibited - the value of this field gets reset in each table by script using "GetNextSerialValue" each time a user logins and their device prefix is identified
new field - ID_OLD (text) field: auto-enter calculation (replaces existing value) that combines the device prefix (stored in a global field) & the record serialNumber - this field was set with the existing IDs prior to converting to UUIDs and is used as the user-visible ID
changed field def. - ID (text) field: auto-enter calculation (replaces existing value) of Get(UUID) - this field is still the primary key field
changed field def. to reference the ID_OLD field vs. the ID field - devicePrefix (text) field: auto-enter calculation (replaces existing value) of the left two characters of the ID_OLD field