Automated Serial Number with strign

I need to have customized Serial No. which is the key column, where this customized Sn is as follows

String-Value of A Column-count

For Example SN-AAA-0001

the next one SN-BXC-0002

SN is String
AAA, BXC, etc. value taken from the Column A
0001, 0002, etc Counter


2 Likes

Thanks for your reply,

considering it is not a key, is it possible to configure the same as mentioned in my question by expression

When 2 users are trying to create a record at the same time, you will always have the probability of having doubles anyway. It’s hard to provide sequential numbering/coding etc. with multiple users.

2 Likes

@LeventK have you ever done something where you can make sure only 1 user can edit? I was thinking maybe like an action that could “request lock” workflow, and forces a sync… Then it’s under that users ownership for a period…

@Grant_Stead
I had once tried it with creating a slice of the table with only the key column and had set a LINKTOROW() action for the form saved event to open up the record in edit mode with another form view. The first form had been set to autosave. It seemed it was working but I was using a delayed sync and as first come first serve rule apply, I don’t think that it will work with multiple users anyway, anyhow.

2 Likes

I am just confused, I expect there is option to generate sequential entry

If I am making orders by adding items and need to show

Ord 00001 and under this order Item 00001, Item 00002.

Next Order

Ord 00002 and under this order Item 00001, Item 00002, Item 00003

I think it should be available as that it the way other shall read later.

If only we depend on the random unique values later for the data base printout, it will be hard to follow

Sequential numbers are discouraged with AppSheet. Because each user is working with a copy of the entire data set, it’s easy for duplicate sequential numbers to be used. In short: sequential numbering is a bad idea in AppSheet. @LeventK posted a link to the doc that explains why. Please read and understand it.

What will you be using as your backend?

When the database for the created info being printed, the shown lengthy complicated references as serial no. or identification shall be too hard to read and follow with others

Sure, but what are you using… Google sheets, SQL?

Excel Sheet uploaded into Google Drive

I would put a sheet formula directly on the Excel sheet based on the row number… In that way you can ensure the numbers stay sequential without duplicate. However, keep in mind that the end user of the app would need to sync, before seeing this value.

Dear Gents,

Once again but in another way…

If I have inline table, where there is entry, and the button add is available to add more line entry. is there is a way to make an auto Sr for a column I added as SN.

This column SN shall not be the key, the Key is unique key.

no issue to start again 1, 2, 3, 4 in each inline table linked to the main table each one under unique no.

@egmv_appsheet
There’s no way to provide sequential numbering whatsoever in AppSheet when multiple users are interacting with the app. The best possible approach is to have a physical column in the back-end sheet with an Arrayformula to ensure that each record in that table have a sequential order. Insert a column after your Key column (assuming that your Key column is in Column A). Give a temporary column header name i.e. XYZ, and format this column as Number i.e. #,##0

After adding this column, regenerate your table’s column structure and ensure that the column is in place in the table schema and it’s correctly imported as Number type. Return back to your back-end and instead of the XYZ header name, use this formula:

ARRAYFORMULA({"ORDER"; ARRAYFORMULA(IF(LEN(A2:A),ROW(A2:A)-1,""))})

Sync your app and all done.

3 Likes

unfortunately it doesn’t work!

1 Like

In what way it’s not working? What’s your back-end? Excel or Google? What have you tried? Can you give a screenshot?

2 Likes