I have a column of sequence number List[Task] which is a unique order number combined with a virtual column with year & month as a prefix, i.e. YYYY-MM-000, below is what I put on the initial value to create the number when the users add a new row.
CONCATENATE([Prefix],
right(“000”&(NUMBER(
INDEX(
SPLIT(
LOOKUP(MAX(List[_RowNumber]),“List”,“_RowNumber”,“Task”)
,[Prefix])
,2)
)+1),3)
)
But the limitation of having this initial value is that if more than 1 user is going to add the record at the same time, the app will create the same order number.
As I need it as a unique number (no worries, I have another column with “UNIQUEID()”), I am going to have data validity to prevent duplicate input.
I went through all the content here, but seem that all the example did not work on my app. I am thinking will it create a conflict here if we use both initial value & data validity on the same column?
Or should I use another trick to use “arrayformula” on the google sheet? but seem that it wouldn’t work coz my order number is depended on the prefix, year & month.
User | Count |
---|---|
40 | |
36 | |
34 | |
23 | |
17 |