# Display row markers in tables not just the data grid

**URL:** <https://community.glideapps.com/t/display-row-markers-in-tables-not-just-the-data-grid/81185>\
**Category:** Ask for Help\
**Created:** [April 4, 2025, 2:15pm UTC](https://community.glideapps.com/t/display-row-markers-in-tables-not-just-the-data-grid/81185 "2025-04-04T14:15:06Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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 6, 2025, 12:30am UTC](https://community.glideapps.com/t/display-row-markers-in-tables-not-just-the-data-grid/81185/5 "2025-04-06T00:30:01Z")

</div>

I used JavaScript for a use case like this recently.

```auto
function getRank(clicksJoined, clicksCount) {
    // Split the joined clicks string into an array of numbers
    const clicksArray = clicksJoined.split(', ').map(Number);

    // Sort the clicks array in descending order
    clicksArray.sort((a, b) => b - a);

    // Initialize rank and previous click count
    let rank = 1;
    let previousCount = clicksArray[0];

    // Iterate through the sorted clicks array to determine the rank
    for (let i = 1; i < clicksArray.length; i++) {
        if (clicksArray[i] < previousCount) {
            rank = i + 1;
            previousCount = clicksArray[i];
        }
        if (clicksArray[i] === clicksCount) {
            return rank;
        }
    }

    // If the clicksCount is the highest, return 1
    if (clicksCount === clicksArray[0]) {
        return 1;
    }

    // If the clicksCount is not found in the array, return -1 (indicating not ranked)
    return -1;
}

return getRank(p1, p2)

```

p1: Comma-delimited list of all “scores”  
p2: Current row’s score

 ![CleanShot 2025-04-06 at 07.29.34](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/4/0438bdbcc4dd243b8dceda1f748ff719f6ff5f0a.jpeg)

Gets something like this.

---

_[View the full topic](https://community.glideapps.com/t/display-row-markers-in-tables-not-just-the-data-grid/81185)._
