Fullproof autonumber with native Glide columns

If you ever use the Miracle method, you need sequential numbers all the time. Not to mention a myriad of other use cases. There are a few solutions floating around, but I’m not sure I’ve seen this one cited. At the same time, it is so stupidly simple, I can’t believe it took me so long to think of it. So it’s entirely possible it’s been posted somewhere and just reemerged for me while I was thinking of something else. If that’s the case and you’re the original author, please let me know. Don’t mean to steal anyone’s thunder :sweat_smile:

The setup

  1. Create a Row ID column. It has unique values that are generated automatically, which we like/need
  2. Lookup that entire column – no relation needed; we need all the values from the column.
  3. Using the “Find element index” column, we search for “Row ID” values in the “lookup_row_id” array.
    CleanShot 2023-05-21 at 12.15.58

And THAT’S IT :sweat_smile:

Every new row will automatically have an index number associated with it. One caveat that can be both pro and con of this method: if you delete a row, no matter in which part of the table, it gets recalculated automatically.

Let me know if you have any questions! =)

5 Likes

Yes, this method is mentioned multiple times ; -) We use an array index to get the number

This method is a godsend, I learnt it from Darren, Jeff or Bob. It’s been shared in the forum a number of times but it doesn’t hurt to repeat it. Good post to link to, thanks.

I use this method so often that I wish we had a Row Index column.

1 Like

Yep… Glide already is numbering rows… They should give acces to that number, so we can save 3 columns

1 Like

Amazing, I couldn’t believe it wasn’t mentioned before, but searching through this forum did not yield the expected results :woman_facepalming: Well, unless admins think this is a waste of space, let it sit here for linking purposes :sweat_smile:

2 Likes

Not a waste at all, on the contrary, it’s a useful post.

1 Like

Found it!!!

Actually, I believe the method was first described by @11183 in the below post:

2 Likes

BTW… just ONE column LOL!

1 column NO Java script :wink:

OK, I give up…

1 Like

One column JavaScript @Eric_Penn. no cheating like you LOL

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.