Hello Guys,
I’d like to create a sort of ID for every single line but not the usual row-id which is impossible to learn by heart. Something like 5 digits or 4.
Any advice on how to proceed ?
Hello Guys,
I’d like to create a sort of ID for every single line but not the usual row-id which is impossible to learn by heart. Something like 5 digits or 4.
Any advice on how to proceed ?
If the row id is too long then use an arrayformula in another column that just narrows down it’s length. Let’s say row id is in column A ans we want our new unique id to be in column B. then b2 would look like this (assuming you are using headers):
=arrayformula(if(a2:a="","",left(a2:a,5)))
Thanks ! However. I’m using Glide Tables…
Oh, I see…hmmmmm…you can use a similar formula in the if scenario
Thanks !
Should I add it like that ?
(It’s a joke between)
seriously?
Trust me I was sarcastic here…
the only way, is to from a beginning when you adding a row in that table have column set +1 for the new row… then you will have all rows nicely numbered… you can add another template column to add table name to that number, so you will have a great indicator what row from which table this data is coming from.
I’ve used this method in a few apps now. The only gotcha is that it is subject to a race condition if two or more users happen to be creating a new record at the same time. So definitely not recommended for high volume usage. But if records are added infrequently, then it works fine.
how is this to have numbering… is just padding with zeros in front
Read it carefully
sorry… i don’t see it… the numbers are already there… not from glide… from GS formula
Yes, steps 3 and 4 just do some padding (because that’s what the OP in that topic was looking for). But steps 1 & 2 provide auto-numbering.
maybe i’am stupid… but i don’t see how you create auto numbering, if you increment max order by 1 , you will get all numbers in column , max order +1… all the same
Of course you’re not stupid… far from it
Maybe it’s not clear…
In order to work, it needs a single row to “kick start” the auto numbering.
Let’s say the column you want auto-numbering is called ID.
You start off with one row, with an ID of 1.
Make sense now?
OMG! this is what i wrote in the beginning…
I’m trying to find the way to get numbers for existing rows…
hahahahha… you were trying to explain me the solution that i proposed in the first place… LOL
problem is, when you have already rows in the Glide table… how to auto number them
hmm, if the number of rows isn’t too many, you could use the same technique and instead of adding new rows, use a Set Columns action.
So show them all in an Inline List and filter where ID is empty.
Set the Action on the Inline List to do a Set Columns, setting the ID to MaxID+1
Then as you tap on each item, the ID is set to the next ID, and the item is removed from the list.
Should work, no?