Why cant I use an autonumber as a syncfield with the Excel importer

1
We needed to do an import on a tabel. The autonumber ID field was the ideal candidate to use as the key field. But strangly the ID field was not shown when we tried to create the template. Any reason why this field is not shown? I know you can not write to this field but it is the ideal key field when I want to synchronise a tabel. I now had to create a custom import. Regards, Ronald
asked
1 answers
1

I believe this would go against some of the intrinsic capabilities of synchronization.

For example, you can't perform an update/insert sync (upsert) based on a seeded SQL field. The reason being is because you can't insert the value; it has to be auto-generated on the db side.

While it makes sense to use it for looking up if a record exists, it can't be used for inserting records. Ultimately, the Excel Importer needs both to function in its consistent manner.

Solution: As you probably have guessed, you'll more than likely have to mimic that column/attribute, and use that for synchronization. E.g. use an on-create event to copy the autonumber into an int attribute.

Side note: Even in MS SQL (and I assume other platforms), you can't Synchronize unless you explicitly set some sort of "Identity Insert Property" on for the sync.

answered