Auto-Increment Field - Creating Duplicates!

Hi -

I’m relatively new to Knack (a few weeks in now). I’m using an auto-increment field to add a Serial Number to an object.

Knack is issuing duplicate serial numbers for this field on many records. Per the definition of the field, this appears to be impossible but it is absolutely happening.

I have 1750 records in this object, and 198 of them have duplicate SNs. I should also note that there are no SNs that are repeated more than once. (That is, there aren’t 3, 4, 5+ copies of any serial number.)

Any thoughts/suggestions?


@MattC - you state that you have duplicate serial numbers, I presume this is because the serial number is concatenated with the auto increment?
If so, raise a ticket to for them to investigate. It should not be possible to have duplicate auto increment values.

Thanks Carl. I’ve submitted a ticket.

Not quite sure what you mean regarding the serial number being concatenated with the auto increment…?

I’m not sure what you mean by serial numbers? Are these numbers you are creating by joining (concatenating) the auto increment with another string from another field.
For example, if you have a Text Formula field you can join the auto increment to another field creating another type of unique reference like a PO number, membership number etc.
That’s what I was referring to about concatenating the auto increment field with another. :blush:

I am not sure but I am expecting the same problem — and I think I know what to blame (well, if the problem actually happens).

In my case, I imported a set of records from an app originally built in Airtable. I am pretty sure that I imported the old serial number values into the new serial number field in Airtable. I can’t remember for sure but it’s possible that, in order to do that, I had initially defined the field that is now an autoincrement field as a number field. But I must then have converted the field to a Autoincrement field, because that field ended up with a bunch of high numbers in it (507, 508, 509) even though I only imported 17 records! And when I started creating new records in the table, the new records were being numbered 1, 2, 3, etc. I expect if I kept creating records, I’d end up reaching the values that were imported (around 500 and greater) and then I’d have duplicates.

I am pretty certain that something very like this is possible in FileMaker, too, and it’s a much more mature product than Knack. (I’ve been using FileMaker for thirty years, which I hasten to say should not be taken as a comment on my own maturity.) FileMaker provides a function for updating the next-serial-number value which is very helpful (especially if one remembers to use it!). Knack could certainly benefit from such a feature as well.

May be easier to add a new Auto Increment field again. It will take 5-10 mins to update so don’t be surprised that there are no values when you add the field.

I was doing a fair amount of importing when this happened, but I’m certain I didn’t import anything into my auto-increment SN field.

Anyhow, Knack support confirmed the issue and ran some code to clean up the duplicate SNs. (I actually just added a new auto increment field and made that my new SN field and deleted the old one. Fortunately, I didn’t have any cross-referenced data that relied on it yet.)