Update existing increment fields

Hello dear knackers !
(I just checked what if that word actually existed In English, and now I wish I didn’t)

Simple question but I cannot find the answer in previous posts:
I recently changed our file numbers from written-by-yourself to Automatic increment. This works great for new files, but all old file numbers are blank.
What do I need to do so existing records are automatically assigned a number?

Thank you knackies !
(still a terrible name, but sausages are better than roadkills…)

2 Likes

Hi there!

Your existing records before you added the Auto Increment field to your table should update and populate a value. At times, it doesn’t happen automatically and the job to update those records can take some time.

If it has been quite some time since you have added the field and you still do not see any values for the Auto Increment field, you can force it to populate values by editing the records or running a batch update (the update you submit doesn’t actually need to update anything).

If you still are unable to see any values after trying that, please reach out to our support team for further assistance. They will be very happy to help you with this!

Thank you for posting your question, and have a great rest of your day! :slight_smile:

1 Like

@Laurent - yes, indeed….a Knacker means something completely different to a Brit :stuck_out_tongue_winking_eye:
Bring a born and bred Londoner, I’m very familiar with the term. Most often you’d hear about animals going to the Knackers yard.

I think Knackster or Knacklehead are approved versions :blush::+1:

1 Like

As @Les said, you don’t actually need to do anything when you add a new auto increment field to a table. It can take someone to update the existing records. If you have thousands of records then I’d expect this to take an hour or so as the update gets queued.

If however your table only has a few hundred records then it should update fairly quickly.

I apologise for this obvious point, but you will need to refresh your browser or navigate to another table and come back to it to refresh the table and see the new auto increments update.

Many builders use “must have fields” which always includes an auto increment. Having a unique number is always useful on any table. As you’ll be aware the number populates straight away when a new record is added.

I’ve never known an auto increment field to not update when added retrospectively, but if it hasn’t, as suggested, raise a ticket to support to investigate. :+1:

Template Fields

1 Like

Carl, I should ask you about this “offline”! Never heard of these British terms before :rofl:

3 Likes

“Knacklehead” sounds too much like “knucklehead” with my French accent, so I’ll pass :wink:

As for my problem, in the end it all worked out but it did bug pretty badly for a while. I will explain it quickly just FYI (if you are interested).
I waited as you said, refreshed, “updated” the data, nothing changed. I ended up switching back to a simple number field, then back to autoincrement, and at that point my whole app was crashing, until I plain deleted the FileNumber. Hypothesis: Before having a autoincrement field, FileNumber was a text field (with letters and numbers). When I switched to autoincrement, it deleted all existing data except a few FileNumber that were already just numbers. Possibly that is what messed everything up.

‘Knackered’, does seem appropriate for long time Knack users… :rofl:

2 Likes