# Sorting an RG with a thing's thing

**URL:** <https://forum.bubble.io/t/sorting-an-rg-with-a-things-thing/113846>\
**Category:** Database\
**Created:** [September 29, 2020, 5:10pm UTC](https://forum.bubble.io/t/sorting-an-rg-with-a-things-thing/113846 "2020-09-29T17:10:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomas.gounot](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/thomas.gounot/32/74988_2.png) [@thomas.gounot](https://forum.bubble.io/u/thomas.gounot)\
**Post date:** [September 29, 2020, 5:10pm UTC](https://forum.bubble.io/t/sorting-an-rg-with-a-things-thing/113846/1 "2020-09-29T17:10:30Z")

</div>

Hello,  
I have a sorting issue, that I still didn’t resolve even by reading the numerous discussions that were written about it. I tried asking directly in these discussions but I had no answers… So maybe creating a new topic is the way to have more visibility !

Basically, I have an RG that contains items, and each item has a field “itemGender” which is a Type “Gender” that I created. The type “Gender” contains the fields :

- “genderTitle” : “Men”, “Women” and “Both”
- “genderRank” : 1 (for Men), 2 (for Women) and 3 (for Both).

What I wanna do is to sort my items by gender rank, not descending : so first the items with the gender “Men”, then the items with the gender “Women”, then the items with the gender “Both”.  
I tried to sort the items with a dynamic field (now I think it’s called “Change which field…”) :

![image](https://us1.discourse-cdn.com/bubble/original/3X/0/1/01300c8659994a37d50c77915508abb42187bee9.png)

So I’m sorting with : Search for items \> itemGender \> genderRank (because the dynamic field name must be printable and it can’t be the type Gender), and then I do : “Descending : no”

![image](https://us1.discourse-cdn.com/bubble/original/3X/e/6/e6955ceb8609463602f7f6918415d266602e920e.png)

But when I test it, no items are displayed on my page, and the debugger shows this error message :  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/a/0/a00806e32dda42021f6f51998057d4321a2de796.png)  
(popular item week is the name of my RG)

I also tried with setting the dynamic sort field at “search for Gender : genderRank” but it shows the same kind of error message :  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/2/f/2fe12b7ffe9982737549d48012ac247652fbf1db.png)

Do you know what’s wrong with what I did ?

Thanks a lot for your answer

---

<div class="post-metadata">

**Author:** ![J805](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/j805/32/41267_2.png) [@J805](https://forum.bubble.io/u/J805)\
**Post date:** [September 29, 2020, 10:33pm UTC](https://forum.bubble.io/t/sorting-an-rg-with-a-things-thing/113846/2 "2020-09-29T22:33:09Z")

</div>

Sorting and filtering is such a challenge to understand at first. Once you understand how things work with Bubble, it can get easier. 😅 Let me see if this can help:

Instead of having itemGender to contain a type Gender, can you just create a field in the itemGender called genderRank and use numbers?

That way you can sort it by itemGender’s genderRank #.

Does that make sense?

Hope that helps! 😊

@j805 [www.NoCodeMinute.com](http://www.NoCodeMinute.com)

**For All Your No-Code Education Needs:**

- One-on-One Tutoring
- eLearning Hub
- Video Tutorials
- No-Code Classes

---

<div class="post-metadata">

**Author:** ![thomas.gounot](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/thomas.gounot/32/74988_2.png) [@thomas.gounot](https://forum.bubble.io/u/thomas.gounot)\
**Post date:** [September 30, 2020, 8:16am UTC](https://forum.bubble.io/t/sorting-an-rg-with-a-things-thing/113846/3 "2020-09-30T08:16:28Z")

</div>

Hello, thanks for your answer  
In deed, it works, but it is still weird and frustrating not to be able to sort by a specific type …

---

<div class="post-metadata">

**Author:** ![J805](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/j805/32/41267_2.png) [@J805](https://forum.bubble.io/u/J805)\
**Post date:** [September 30, 2020, 2:03pm UTC](https://forum.bubble.io/t/sorting-an-rg-with-a-things-thing/113846/4 "2020-09-30T14:03:10Z")

</div>

Yeah. It’s something I struggled with for a long time. If someone has a better way to do this I would love to know how. I have searched all over the forum and even contacted Bubble support about this sort of thing. 🤷🏻‍♂️😊

Glad it’s working for you now.
