# \[HELP\] Sort RG by User's Rank's weight

**URL:** <https://forum.bubble.io/t/help-sort-rg-by-users-ranks-weight/189224>\
**Category:** Database\
**Created:** [February 1, 2022, 1:24am UTC](https://forum.bubble.io/t/help-sort-rg-by-users-ranks-weight/189224 "2022-02-01T01:24:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cliffwoodjames](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/cliffwoodjames/32/121184_2.png) [@cliffwoodjames](https://forum.bubble.io/u/cliffwoodjames)\
**Post date:** [February 1, 2022, 1:24am UTC](https://forum.bubble.io/t/help-sort-rg-by-users-ranks-weight/189224/1 "2022-02-01T01:24:09Z")

</div>

Hi folks,

I have an issue with a repeating group and sorting it. I have a repeating group of users, each user has a “Rank” and each “Rank” has a “Weight”.

I want to sort my List of User’s based on weight. So for example, if John Doe had the Rank CEO (weight 1) he would show at the top and below him, Jane Doe (Rank COO, Weight 2) would show.

---

<div class="post-metadata">

**Author:** ![paul29](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@paul29](https://forum.bubble.io/u/paul29)\
**Post date:** [February 1, 2022, 2:42am UTC](https://forum.bubble.io/t/help-sort-rg-by-users-ranks-weight/189224/2 "2022-02-01T02:42:32Z")

</div>

Two ways to do this. Either use “options sets” which have order associated with them (if you’re not familiar bubble has a vide on them) or add an order field to your Rank data type and then sort by the order field but display the “weight”

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [February 1, 2022, 2:51am UTC](https://forum.bubble.io/t/help-sort-rg-by-users-ranks-weight/189224/3 "2022-02-01T02:51:44Z")

</div>

You can do this with List Shifter. (Mapped sorting — sort the values in List shifter by some arbitrary List expression of the same length such as Thing’s Subthing’s Subthing’s Field.)

Try it out.

---

<div class="post-metadata">

**Author:** ![cliffwoodjames](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/cliffwoodjames/32/121184_2.png) [@cliffwoodjames](https://forum.bubble.io/u/cliffwoodjames)\
**Post date:** [February 1, 2022, 2:54am UTC](https://forum.bubble.io/t/help-sort-rg-by-users-ranks-weight/189224/4 "2022-02-01T02:54:08Z")

</div>

Hey Keith,

Thanks for your help yesterday and I’m pleased to say that after spending some time working with List Shifter on this issue I actually managed to do it!

I send the list to the list shifter element then SORT the element by each item’s rank’s weight and format the list as text. This gives me the intended effect!

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [February 1, 2022, 2:59am UTC](https://forum.bubble.io/t/help-sort-rg-by-users-ranks-weight/189224/5 "2022-02-01T02:59:29Z")

</div>

Kewl. That’s one of the many many use cases for List Shifter!
