# How to create a conditional ranking system based on user level and a numeric range?

**URL:** <https://community.glideapps.com/t/how-to-create-a-conditional-ranking-system-based-on-user-level-and-a-numeric-range/81377>\
**Category:** Ask for Help\
**Created:** [April 16, 2025, 2:53pm UTC](https://community.glideapps.com/t/how-to-create-a-conditional-ranking-system-based-on-user-level-and-a-numeric-range/81377 "2025-04-16T14:53:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lasevicius](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lasevicius/32/79164_2.png) [@Lasevicius](https://community.glideapps.com/u/Lasevicius)\
**Post date:** [April 16, 2025, 2:53pm UTC](https://community.glideapps.com/t/how-to-create-a-conditional-ranking-system-based-on-user-level-and-a-numeric-range/81377/1 "2025-04-16T14:53:03Z")

</div>

Hi! I’m trying to implement a dynamic classification system using `if-then-else`, but I’m stuck on how to check **multiple conditions** together.

Here’s what I need:

- I have a user level field (Beginner, Intermediate, Advanced)
- I also have a Rollup value that sums up the number of series for a training plan
- Based on the user level, I want to classify that rollup into 3 categories (e.g., Low / Medium / High volume)

The ranges depend on the level, like this:

- Beginner:
  - Low: 0–6
  - Medium: 7–12
  - High: 13+

- Intermediate:
  - Low: 0–9
  - Medium: 10–15
  - High: 16+

So, if one user is a Beginner and has a rollup of `10`, the result should be “Medium Volume” —  
but if another user is Intermediate with the same rollup `10`, the result should be “Low Volume”.

The problem: `If-Then-Else` only lets me evaluate one condition at a time, and doesn’t support `AND` or value ranges directly.

How could I structure this logic in Glide?

Thanks in advance!

---

<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 16, 2025, 3:13pm UTC](https://community.glideapps.com/t/how-to-create-a-conditional-ranking-system-based-on-user-level-and-a-numeric-range/81377/2 "2025-04-16T15:13:08Z")

</div>

Quick chatGPT ask. Try the following in a javascript column. I haven’t tested this.

```auto
// Inputs: userLevel (string), rollup (number)
function classifyVolume(userLevel, rollup) {
  if (userLevel === "Beginner") {
    if (rollup <= 6) return "Low Volume";
    else if (rollup <= 12) return "Medium Volume";
    else return "High Volume";
  } else if (userLevel === "Intermediate") {
    if (rollup <= 9) return "Low Volume";
    else if (rollup <= 15) return "Medium Volume";
    else return "High Volume";
  } else if (userLevel === "Advanced") {
    // You can define your own ranges for Advanced
    if (rollup <= 12) return "Low Volume";
    else if (rollup <= 18) return "Medium Volume";
    else return "High Volume";
  } else {
    return "Unknown Level";
  }
}

// Example usage
const userLevel = p1; // assuming Glide passes this in
const rollup = parseInt(p2); // make sure it's a number
return classifyVolume(userLevel, rollup);

```

---

<div class="post-metadata">

**Author:** ![Lasevicius](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lasevicius/32/79164_2.png) [@Lasevicius](https://community.glideapps.com/u/Lasevicius)\
**Post date:** [April 16, 2025, 6:36pm UTC](https://community.glideapps.com/t/how-to-create-a-conditional-ranking-system-based-on-user-level-and-a-numeric-range/81377/3 "2025-04-16T18:36:38Z")

</div>

Thank you. I’m not used to JS in glide, so haven’t tried asking GPT for one, just for other ways to do this logic, guess I’ll use more JS from now on hahaha. Thanks!!

---

<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:** [April 23, 2025, 6:37pm UTC](https://community.glideapps.com/t/how-to-create-a-conditional-ranking-system-based-on-user-level-and-a-numeric-range/81377/4 "2025-04-23T18:37:06Z")

</div>

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