How to Make Key Column Autofill

I have set my key column as “Entry No.” column, and I have put in the numbers already in the spreadsheet, from 1-100. However, when I test the app, it still asks to put data in the “Entry No.” field.

How do I make the “Entry No.” key column auto-fill? Starting from 1.

It’s not a good idea to have sequential numbers as Key column values because 2 users while creating a record, they can have identical keys which will create a conflict. I encourage you using UNIQUEID() expression in the initial value instead. I recommend reading below pages as well.

1 Like

I if the entry no. has already been entered, the other user trying to enter this number again will be told it’s already there.

The rows that have the pre-filled Entry No. values are already-existent rows. If you add a new row using the system-provided Add action/button, a new row will be added. If you want the Add action to use an existing, pre-filled row, you’ll need to create your own Add action to replace the system-provided one.

How to do this? Is there a video about this? Is it a behavior function?

That’s for you to figure out.

Specifically for what you’re trying to do? I doubt it.


Provided your idea is to read the lately created record’s Entry No. and continue/incrementing from there when creating a new record, the scenario is always the same: you always have the possibility of creating duplicate (or even more depending on the number of users) key column values with the same Entry No. As @Steve had already said, when creating records, the data is not in the back-end yet and there is no way for AppSheet to estimate if any user might be using the same Entry No. when creating a record at the same time. Therefore, as a rule of thumb we advise preventing use of sequential key values and use of UNIQUEID() expression instead.

1 Like