Adding serial numbers for different products

I have a form set up and i want a sequential numbering formula to make sure the following happens.
17/12 /2021 - Product A - A00001
17/12 /2021 - Product B - B00001
18/12 /2021 - Product A - A00002
19/12 /2021 - Product A - A00003
20/12 /2021 - Product B - B00002

Here is a good topic about it

[Serial Numbers, If You Must](https://community.appsheet.com/t/serial-numbers-if-you-must/19325) Tips & Tricks ?

Danger Ahead! In general, sequential numeric identifiers (i.e., serial numbers) are risky in AppSheet: if two users happen to add rows at the same time, both rows could be assigned the same serial number, which could lead to confusion (at the least) or data loss (at the worst). For this reason, serial numbers are strongly discouraged! Basic Serial Numbers One way to implement serial numbers is with a normal (not virtual) column named (e.g.) Serial of type Number and an Initial value expression …

3 Likes

this will be only used by one user. (MAX(MyTable[Serial]) + 1), how do i change this to accommodate what i want?

2 Likes
CONCATENATE(
  right([Product Name], 1), 
  right(
    concatenate(
      "0000", 
      MAX(MyTable[Serial]) + 1
    ), 
    5
  )
)

  • That first part (with the right(product name) bit…) is only there to get the β€œA” β€œB” or whatever value from the product name.
    • You might find better ways to get that
3 Likes

the issue im getting with this is
17/12 /2021 - Product A - A00001
17/12 /2021 - Product B - B00002
18/12 /2021 - Product A - A00003
19/12 /2021 - Product A - A00004
20/12 /2021 - Product B - B00005

COUNT(
  FILTER(
    "YOURTABLE",
    [PRODUCTNAMECOLUMN]=[_THISROW].[PRODUCTNAMECOLUMN]
  )
)+1

Put this instead of the MAX()

3 Likes