# Is there something like a record counter?

**URL:** <https://community.glideapps.com/t/is-there-something-like-a-record-counter/39565>\
**Category:** Ask for Help\
**Created:** [March 12, 2022, 8:52pm UTC](https://community.glideapps.com/t/is-there-something-like-a-record-counter/39565 "2022-03-12T20:52:56Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pierre\_de\_Man](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pierre_de_man/32/34925_2.png) [@Pierre\_de\_Man](https://community.glideapps.com/u/Pierre_de_Man)\
**Post date:** [March 12, 2022, 8:52pm UTC](https://community.glideapps.com/t/is-there-something-like-a-record-counter/39565/1 "2022-03-12T20:52:56Z")

</div>

Is there something like a record counter?  
Let me try to explain this.  
Right now I have a sheet/table where I have a field with a date.  
This is the date of entry.  
I have some columns in which I count the last 7 days and use the values of that date in a template, so I can use it for Quickchart.  
This works great if every day I input a new record with a date and a value.

But now I was thinking, how about if I skip one or two days, then the counting of the last 7 entries is not working.  
So I was looking for something like a record counter.  
That every time a new record is added, the counter increases.  
Then I could use that counter to count the last 7 entries.  
Then I am sure I always have the last seven entries.

Somewhere I saw something with a rollup and count.  
And a column that adds a 1 to that count.  
But then, how would I place the new number in the newly created row?

Or maybe someone has another idea on how to get the last 7 entries.  
I hope my question is clear.  
Many thanks in advance for your tips.  
(I am still busy learning Glide, so please be as clear and detailed as possible. Thanks)

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [March 12, 2022, 9:24pm UTC](https://community.glideapps.com/t/is-there-something-like-a-record-counter/39565/2 "2022-03-12T21:24:17Z")

</div>

this is very simple… create a number column, call it counter…  
add another column rollup maximum value from counter column  
add another math column call it max counter plus 1… and the function will be rollup maximum + 1, now every time you make a new record, set the counter column with the value from the column max counter plus 1.

---

<div class="post-metadata">

**Author:** ![Pierre\_de\_Man](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pierre_de_man/32/34925_2.png) [@Pierre\_de\_Man](https://community.glideapps.com/u/Pierre_de_Man)\
**Post date:** [March 12, 2022, 10:16pm UTC](https://community.glideapps.com/t/is-there-something-like-a-record-counter/39565/3 "2022-03-12T22:16:36Z")

</div>

@Uzo, thanks but it is only working half.  
I have created the number column and called it counter  
Then I created the rollup column and called it RollupMax and pointed it to the counter column  
Then I created the math column and called it “Counter+1”  
In there, for the configuration, I had put “counter+1” and for the replacements, I had put counter and let it point to the counter column.  
And then it stops.  
In the counter column in the first row, I placed the number 1  
In the “Counter+1” column it shows 2  
But how do I get that number 2 to the counter column every time a new row is added?  
As a test, I had 4 rows and place the number 1 to 4 in that column  
When I added a new row, nothing happened.  
The Rollup column goes to 5, and the “counter+1” goes to 6  
And the counter column stays at 4 and the next row is empty.  
I had made a screenshot and hopes it shows what I am trying to explain 🙂  
 ![2022-03-12_23-14-37](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/5/c50418891e8fda72744a54abb89b577bc3ffc698.jpeg)

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [March 12, 2022, 11:16pm UTC](https://community.glideapps.com/t/is-there-something-like-a-record-counter/39565/4 "2022-03-12T23:16:31Z")

</div>

I see that you did not follow my instruction precisely, your mistake is that you should add 1 to the rollup max column not to counter… change that and it will work well… column Counter+1 should have all numbers the same.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [March 12, 2022, 11:22pm UTC](https://community.glideapps.com/t/is-there-something-like-a-record-counter/39565/5 "2022-03-12T23:22:45Z")

</div>

Try something like this:

> [@open\_mailbox\_with\_raised\_flag Create a Referral Code System with CUSTOM and UNIQUE User Codes](https://community.glideapps.com/t/create-a-referral-code-system-with-custom-and-unique-user-codes/37944):
>
> wave Hey all! In this video, I demonstrate how to generate short, pretty and unique codes per user to be used as IDs or invite codes and how to use these codes to create a referral system for your app. This tutorial is great for creating: Invite codes Unique User IDs that are prettier than Row IDs Order IDs Item IDs …etc. popcorn Enjoy! [[Glide: Create a Referral Code System with CUSTOM and UNIQUE User Codes] ](https://www.youtube.com/watch?v=CkBk6m_9Wxk)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [March 13, 2022, 1:56am UTC](https://community.glideapps.com/t/is-there-something-like-a-record-counter/39565/6 "2022-03-13T01:56:43Z")

</div>

For this use case, I think the Row Index method is the simplest approach.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [March 13, 2022, 1:59am UTC](https://community.glideapps.com/t/is-there-something-like-a-record-counter/39565/7 "2022-03-13T01:59:21Z")

</div>

this is great! I did not think of it. how did you come up with that… very clever!

 ![Screen Shot 2022-03-12 at 9.13.15 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/b/6bf626fb441abbcfd0e9b0a57a14a0af1b02d15f.png)

Thanks for sharing! @Darren_Murphy, now I can do webhooks directly from glide without waiting for glide to write the value in GS! Wow… my Apps gonna be so fast!

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [March 13, 2022, 4:00am UTC](https://community.glideapps.com/t/is-there-something-like-a-record-counter/39565/8 "2022-03-13T04:00:24Z")

</div>

Thanks, but I can’t take credit. It was @11183 that came up with the idea. And yeah, it’s a great technique - I’ve already found many many uses for it.

---

<div class="post-metadata">

**Author:** ![Pierre\_de\_Man](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pierre_de_man/32/34925_2.png) [@Pierre\_de\_Man](https://community.glideapps.com/u/Pierre_de_Man)\
**Post date:** [March 13, 2022, 9:23am UTC](https://community.glideapps.com/t/is-there-something-like-a-record-counter/39565/9 "2022-03-13T09:23:36Z")

</div>

Thanks @Darren_Murphy  
This works 🙂

There is no problem later when the column “AllRowIDs” is getting too big?  
I mean, that there are too many RowIDs in the array?

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [March 13, 2022, 9:30am UTC](https://community.glideapps.com/t/is-there-something-like-a-record-counter/39565/10 "2022-03-13T09:30:30Z")

</div>

good point… depends on how they store joined data

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [March 13, 2022, 10:02am UTC](https://community.glideapps.com/t/is-there-something-like-a-record-counter/39565/11 "2022-03-13T10:02:20Z")

</div>

I think I’ve seen Jason mention a character limit. I can’t recall what it is, but it’s something crazy like billions (maybe trillions?) of characters. Probably not something you have to worry about 😉

Keep in mind also that this is computed data, so it doesn’t actually impact the “size” of your app.

---

<div class="post-metadata">

**Author:** ![Pierre\_de\_Man](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pierre_de_man/32/34925_2.png) [@Pierre\_de\_Man](https://community.glideapps.com/u/Pierre_de_Man)\
**Post date:** [March 13, 2022, 10:12am UTC](https://community.glideapps.com/t/is-there-something-like-a-record-counter/39565/12 "2022-03-13T10:12:17Z")

</div>

Thanks  
Good to know 🙂

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [March 14, 2022, 12:11am UTC](https://community.glideapps.com/t/is-there-something-like-a-record-counter/39565/13 "2022-03-14T00:11:18Z")

</div>

> [@Chat and Comments using the Trebuchet Method](https://community.glideapps.com/t/chat-and-comments-using-the-trebuchet-method/25396/4):
>
> According to @Jason you can store 1 million characters in a glide table cell. Google sheets limited to 50,000 characters per cell

It’s 1 million.

Considering a rowID is 22 characters long, it has to get to 45455 row IDs for it to break, I reckon.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [March 15, 2022, 12:11am UTC](https://community.glideapps.com/t/is-there-something-like-a-record-counter/39565/14 "2022-03-15T00:11:45Z")

</div>

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