How can i let the program create key automati

How can i let the program create key automatically in succession ?

I tried using the function UNIQUEID() but it is giving random key numbers ( Not in succession )

Solved Solved
0 10 438
1 ACCEPTED SOLUTION

You can use MAX(TableName[ID])+1 in initial value field but please remember that if you have more than one user or one user with two devices, you probably will have duplicates.

View solution in original post

10 REPLIES 10

What kind of key value are you looking for?

If the new record itโ€™s been created by many users, the answer is No, you canโ€™t create a sequential key (chevk this https://help.appsheet.com/data/keys/sequential-keys) . If the creation of the record is managed just by one person you can use this:

In the INITIAL_VALUE option of your ID (or Key) column code this:

=COUNT(YourTable[ID]) + 1

Sequential Keys help.appsheet.com

@Suvrutt_Gurjar jejeje I think weโ€™re SYNC

Guysโ€ฆ letโ€™s see first what kind of key he is needing

@Aleksi_Alkio, Fully agreed. As usual your approach is properly

methodical.

Good Day,

Example, I have column named [ID]. I am going to insert integers as date in this column. Obviously those numbers dont start from zero. Let us say that number I entered is 201832 first entry when I create a new record, I need the program to increment value by 1. So new record [ID] will be 201833. The function ( =COUNT(YourTable[ID]) + 1 )

you gave me, if first entry is 201832. The second entry by program is 2 not 201833. Your function ( =COUNT(YourTable[ID]) + 1 ) is counting number of entries to give new id.

Thank you all

You can use MAX(TableName[ID])+1 in initial value field but please remember that if you have more than one user or one user with two devices, you probably will have duplicates.

@Aleksi_Alkio

Dear brother

Thank you very very very much. this is what I was looking for. It works fine.

Just in case, is there any other way we can use this function without duplication (If there is more than one user)

Iโ€™m afraid that wonโ€™t be possible.

Hi @UNITED_SKATEBOARDS Sequential keys

is not a recommended practice. I request you to go through the following article-

help.appsheet.com - Sequential Keys Sequential Keys help.appsheet.com

Top Labels in this Space