# Ranking and Data Storage

**URL:** https://community.glideapps.com/t/ranking-and-data-storage/81521
**Category:** Ask for Help
**Created:** [April 24, 2025, 5:46pm UTC](https://community.glideapps.com/t/ranking-and-data-storage/81521 "2025-04-24T17:46:53Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Shirochka\_Janapati](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shirochka_janapati/32/87429_2.png) [@Shirochka\_Janapati](https://community.glideapps.com/u/Shirochka_Janapati)
#### Post date: [April 24, 2025, 5:46pm UTC](https://community.glideapps.com/t/ranking-and-data-storage/81521/1 "2025-04-24T17:46:53Z")

</div>

So I’m trying to make an app for my school where stydents can complete fun, mindful, and educational chllanges to earn points. Different challenges have different point values, and I approve student’s submissions after they submit, and they get points. I want the app to record the total points someone has (assigned to their email) and show it, and use the points to place the students in a ranking system.

I can’t figure out how to do the rollup to calculate each individual person’s total points.I’ve tried this method:  
In my submissions table,

1. Created a Template column that pull in the values from the user’s email column
2. Created a relation column to link the emails in the template column to the emails that students enter in the submissions table.
3. Tried to create a rollup column to roll up values from my relation column.

It seems like I can’t use a relation column as a source for my rollup. Is there a work around for this?

My submissions table:

 ![Screenshot 2025-04-24 at 10.45.14 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/d/4d794107192d3b61f88aded0e1ed5088e843a7fe.png)

My Users table:

 ![Screenshot 2025-04-24 at 10.46.35 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/3/c321b36b92ca8a957ca78fedb8fc751b70a0600f.png)

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [April 24, 2025, 5:59pm UTC](https://community.glideapps.com/t/ranking-and-data-storage/81521/2 "2025-04-24T17:59:19Z")

</div>

Do you have the ‘Multiple’ check box selected in the relation?

Instead of a relation you could use a Query column and eliminate the need for template columns.

Also, I noticed you have emails that sometimes have uppercase letters and sometimes don’t. Be careful with that because relations and queries will be looking for exact matches. If letter case doesn’t match, the relation or query won’t return a match.

---

<div class="post-metadata">

### Author: ![Shirochka\_Janapati](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shirochka_janapati/32/87429_2.png) [@Shirochka\_Janapati](https://community.glideapps.com/u/Shirochka_Janapati)
#### Post date: [April 25, 2025, 2:16am UTC](https://community.glideapps.com/t/ranking-and-data-storage/81521/3 "2025-04-25T02:16:52Z")

</div>

> [@Jeff\_Hager](#):
>
> Instead of a relation you could use a Query column and eliminate the need for template columns.

Yay thank you that worked!!! How exactly would I go about setting up a ranking system?

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [April 25, 2025, 3:41am UTC](https://community.glideapps.com/t/ranking-and-data-storage/81521/4 "2025-04-25T03:41:31Z")

</div>

At a basic level, you could use case number 2 in the following post. Instead of pointing the lookup at the entire table, you would point it at your sorted query. This works at a basic level, but gets complicated if you start to have ties. All depends on how you would expect ties to be handled.

> [@How do I create an auto-incrementing row number with Glide Tables?](https://community.glideapps.com/t/how-do-i-create-an-auto-incrementing-row-number-with-glide-tables/39572):
>
> This is a question that comes up a lot, so creating this topic to use as a reference. Typically, there are two distinct use cases when it comes to auto-incrementing row numbers. Use Case 1: – We need to generate a Part Number, or an Order Number, or an Employee ID. Once the number is generated, it should never change, even if rows are deleted. – The general approach for this use case is to maintain a static counter, use it to craft a suitably formatted ID, and increment it by one every time…

---

<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: [April 25, 2025, 4:47am UTC](https://community.glideapps.com/t/ranking-and-data-storage/81521/5 "2025-04-25T04:47:18Z")

</div>

If you need something like the below, where ties are handled, I can help.

 ![CleanShot 2025-04-25 at 12.45.38](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/2/12ce5379edb07d4a862279a9be36e18ca2a4307a.png)

---

<div class="post-metadata">

### Author: ![Shirochka\_Janapati](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shirochka_janapati/32/87429_2.png) [@Shirochka\_Janapati](https://community.glideapps.com/u/Shirochka_Janapati)
#### Post date: [April 25, 2025, 6:58am UTC](https://community.glideapps.com/t/ranking-and-data-storage/81521/6 "2025-04-25T06:58:37Z")

</div>

I’ve tried using rollup columns and templates and query columns multiple times to try to make a ranking system..  
It seems like glide won’t let me use a template or query column as a source for a rollup column.  
what other simpler way can I use to create a ranking system?  
I’m trying to do everything through my “Users” tab (photo attatched below).

 ![Screenshot 2025-04-24 at 11.58.13 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/e/8e7aa771d1b5ad477ec090f0f028097a5a95adbc.jpeg)

---

<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: [April 25, 2025, 3:15pm UTC](https://community.glideapps.com/t/ranking-and-data-storage/81521/7 "2025-04-25T15:15:53Z")

</div>

> [@Shirochka\_Janapati](#):
>
> I’ve tried using rollup columns and templates and query columns multiple times to try to make a ranking system..  
> It seems like glide won’t let me use a template or query column as a source for a rollup column.

Can you show us how you’re setting these up, the column configurations to be exact.

Have you applied the case number 2 Jeff mentioned above?

---

<div class="post-metadata">

### Author: ![Shirochka\_Janapati](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shirochka_janapati/32/87429_2.png) [@Shirochka\_Janapati](https://community.glideapps.com/u/Shirochka_Janapati)
#### Post date: [April 25, 2025, 5:29pm UTC](https://community.glideapps.com/t/ranking-and-data-storage/81521/9 "2025-04-25T17:29:31Z")

</div>

I couldn’t figure out how to use Case 2, I didn’t see a specific “Find Element Index” option.  
here’s what I was trying to do in the Users table:

1. Template column (Template- [Total Points]. “Total Points” is just replaced by the total points values column. )
2. Relation Column (Total points is related to total points. Condition - “is less than”
3. Rollup (Sum of the relation column)
4. Math column (Formula - Rank +1 )

Where I kept coming to a dead end was step 3. I can’t have a relation column as the source for a rollup column.

This is my first time using the app, and I don’t have much experience with app creating either so I’m trying to stick to simple steps.

---

<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: [April 25, 2025, 11:55pm UTC](https://community.glideapps.com/t/ranking-and-data-storage/81521/10 "2025-04-25T23:55:14Z")

</div>

> [@Shirochka\_Janapati](#):
>
> Where I kept coming to a dead end was step 3. I can’t have a relation column as the source for a rollup column.

Yes you can. As long as it is a multiple relation.

---

<div class="post-metadata">

### Author: ![Shirochka\_Janapati](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shirochka_janapati/32/87429_2.png) [@Shirochka\_Janapati](https://community.glideapps.com/u/Shirochka_Janapati)
#### Post date: [April 26, 2025, 5:55am UTC](https://community.glideapps.com/t/ranking-and-data-storage/81521/11 "2025-04-26T05:55:09Z")

</div>

![Screenshot 2025-04-25 at 10.51.59 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/2/628bfd49414be06c9560bfa4a205f2bb2bf93640.jpeg)  
 ![Screenshot 2025-04-25 at 10.52.17 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/c/fcea2ec3742b4dcb40b01f50e461d66abd5991ce.jpeg)

Attached are the photos of the relation and rollup column I was trying to add.  
i was trying to follow this process:

1. A template column that uses `Total Points` to pull the value from that column
2. a Relation column that links each Total Points to Total Points
3. a Rollup column (source is supposed to be the relation column from above)
4. Math Column for rank (1 + Rollup Column)

I couldn’t figure it out.😭 Could you walk me through the steps?

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [April 26, 2025, 6:28am UTC](https://community.glideapps.com/t/ranking-and-data-storage/81521/12 "2025-04-26T06:28:59Z")

</div>

> [@Shirochka\_Janapati](#):
>
> A template column that uses `Total Points` to pull the value from that column

What’s the purpose of the template column? Using that will cover a number to text, which can’t be rolled up using sum.

> [@Shirochka\_Janapati](#):
>
> a Relation column that links each Total Points to Total Points

Why are you trying to create a relation using points? I thought you were trying to create a relation using the student email. Isn’t that what you want, so you can summarize points for each student? Isn’t that what you already have to get the total points already?

> [@Shirochka\_Janapati](#):
>
> a Rollup column (source is supposed to be the relation column from above)

Like I said above, if you ate using the template column, it’s not going to give you a number, so you can’t use it for a sum. You didn’t have to always use a template column to create a relation. And like I said earlier, you could have used a query column to create your initial relation and not need template columns at all.

> [@Shirochka\_Janapati](#):
>
> Math Column for rank (1 + Rollup Column)

Not sure I follow what the purpose of this is for.

I think we need to back up a bit. You already have total points for each student. Go back and look at Darren’s case #2 video. Create a query column in place of a relation that retrieves all rows for the students, but sorts the results by total points. The rest of Darren’s steps should be the same.

---

<div class="post-metadata">

### Author: ![Shirochka\_Janapati](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shirochka_janapati/32/87429_2.png) [@Shirochka\_Janapati](https://community.glideapps.com/u/Shirochka_Janapati)
#### Post date: [April 27, 2025, 11:41pm UTC](https://community.glideapps.com/t/ranking-and-data-storage/81521/13 "2025-04-27T23:41:58Z")

</div>

![Screenshot 2025-04-27 at 4.41.14 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/8/f82036a6437dbafa93de71f4439fc1c5121553cd.png)

I figured it out thank you for all the help. 🙂
