# Sorting according to a Thing's Thing field

**URL:** <https://forum.bubble.io/t/sorting-according-to-a-things-thing-field/7208>\
**Category:** Idea\
**Created:** [October 22, 2016, 4:56pm UTC](https://forum.bubble.io/t/sorting-according-to-a-things-thing-field/7208 "2016-10-22T16:56:36Z")\
**Posts on this page:** 10\
**Page:** 2

<div class="post-metadata">

**Author:** ![mikepost80](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikepost80/32/62296_2.png) [@mikepost80](https://forum.bubble.io/u/mikepost80)\
**Post date:** [August 16, 2020, 5:09am UTC](https://forum.bubble.io/t/sorting-according-to-a-things-thing-field/7208/21 "2020-08-16T05:09:34Z")

</div>

> [@julian\_digitalsilva](#):
>
> I am not going to put a Vendor name as a text field on the purchase order, as it’s redundant and already stored in the linked Vendor thing.

I just wish that the cofounders had deep technical experience instead of coming from MBA school. I feel like there’ll always be a disconnect between what engineers need and what Bubble thinks it needs.

I’m about 1 or 2 forum threads away from switching to Webflow, they seem to have a better dev community built around them.

I’m still here because I _want_ to like Bubble, as its core UX was promising. But Emmanuel’s unhelpful comments in the forums just displays a total disregard to what their paying customers want.

---

<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:** [August 16, 2020, 5:22am UTC](https://forum.bubble.io/t/sorting-according-to-a-things-thing-field/7208/22 "2020-08-16T05:22:37Z")

</div>

Dude, List Shifter has a SORT function that lets you put any expression in it. Problem solved. How many times do I have to explain this to people?

ALSO: NEW FUCKING VERSION OF LIST SHIFTER AVAILABLE. Has a SORT Complete event. So now you can tell when your asynchronous SORT completed. 🎉

(RITE HEEERE: [List Shifter: Reverse, Rotate, Swap and ITERATE (Loop) Over Bubble Lists | Now at v1.4: Adds Numeric Option, GET INDEX Action](http://forum.bubble.io/t/list-shifter-reverse-rotate-swap-and-iterate-loop-over-bubble-lists-now-at-v1-4-adds-numeric-option-get-index-action/56237/193))

---

<div class="post-metadata">

**Author:** ![mikepost80](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikepost80/32/62296_2.png) [@mikepost80](https://forum.bubble.io/u/mikepost80)\
**Post date:** [August 16, 2020, 4:09pm UTC](https://forum.bubble.io/t/sorting-according-to-a-things-thing-field/7208/23 "2020-08-16T16:09:00Z")

</div>

It’s funny I’ve been trying out the List Shifter, but the UI is a little confusing (one example being that it wasn’t obvious that I needed to set up an **action** , as I thought that setting the fields in the **element** was all that needed doing until I looked at your examples).

So maybe you can clarify something for me, or maybe it doesn’t do what I need it to do. I’ve been looking at the examples, and trying to implement it with my own app.

I have a list of things with a **to-many** relationship (ie, to a related list of things). Let’s use the example of Houses and Paints. Instead of a House having one Paint, let’s assume it has a list.

Now how do I display a list of Houses, sorted by the number (count) of Paints that they use? E.g., House A might use 3 paints, House B might use 5 paints, House C might use 1 paint - therefore my list would display as:

1. House C
2. House A
3. House B

---

<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:** [August 16, 2020, 5:31pm UTC](https://forum.bubble.io/t/sorting-according-to-a-things-thing-field/7208/24 "2020-08-16T17:31:18Z")

</div>

> [@Sorting according to a Thing's Thing field](http://forum.bubble.io/t/sorting-according-to-a-things-thing-field/7208/18):
>
> List Sifter’s SORT action does this. Put List Shifter on page Set its “List to Shift” as the list you need to sort. Fire the SORT List Action at it. For “Source Sort List”, just compose the Thing’s Thing’s field. List Shifter’s “Shifted List” output now contains the sorted version of the list. Example: Here’s an explorer page demonstrating this basic use of SORT in List Shifter: [https://list-shifter-demo.bubbleapps.io/version-test/mapped-sort-basic?debug\_mode=true](https://list-shifter-demo.bubbleapps.io/version-test/mapped-sort-basic?debug_mode=true) And [here’s the …](https://bubble.io/page?type=page&name=mapped-sort-basic&id=list-shifter-demo&tab=tabs-1)

---

<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:** [August 16, 2020, 5:42pm UTC](https://forum.bubble.io/t/sorting-according-to-a-things-thing-field/7208/25 "2020-08-16T17:42:37Z")

</div>

Or a fancier example: [https://list-shifter-demo.bubbleapps.io/version-test/mapped-sort-simpler-count](https://list-shifter-demo.bubbleapps.io/version-test/mapped-sort-simpler-count)

---

<div class="post-metadata">

**Author:** ![mikepost80](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikepost80/32/62296_2.png) [@mikepost80](https://forum.bubble.io/u/mikepost80)\
**Post date:** [August 16, 2020, 7:28pm UTC](https://forum.bubble.io/t/sorting-according-to-a-things-thing-field/7208/26 "2020-08-16T19:28:29Z")

</div>

But that type House has a **one-to-one** relationship on Paint.

 ![Screen Shot 2020-08-16 at 3.25.47 PM](https://us1.discourse-cdn.com/bubble/original/3X/6/c/6c2c408691c499d435fca42f5b376346a8318dd7.png)

The example I gave above had a **one-to-many** relationship (if the Paint field was a **list** on a House type).

Thanks, but I think I might have to go for the _hidden_ RG option. I just wish there was a more elegant option out of the box with Bubble.

---

<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 25, 2020, 9:37am UTC](https://forum.bubble.io/t/sorting-according-to-a-things-thing-field/7208/27 "2020-09-25T09:37:06Z")

</div>

Hello,  
Thanks for this solution, I also have a sorting issue with my app. I tried what you suggested but it still doesn’t work…  
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 “Women”, then “Both”.  
I tried to sort the items within 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:** ![jeremias.steinmann](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jeremias.steinmann/32/83426_2.png) [@jeremias.steinmann](https://forum.bubble.io/u/jeremias.steinmann)\
**Post date:** [January 26, 2021, 11:52pm UTC](https://forum.bubble.io/t/sorting-according-to-a-things-thing-field/7208/28 "2021-01-26T23:52:38Z")

</div>

same error here, @james.k.grover 's trick does not seem to work for me either.

---

<div class="post-metadata">

**Author:** ![axelngabe](https://avatars.discourse-cdn.com/v4/letter/a/b19c9b/32.png) [@axelngabe](https://forum.bubble.io/u/axelngabe)\
**Post date:** [March 24, 2021, 4:45pm UTC](https://forum.bubble.io/t/sorting-according-to-a-things-thing-field/7208/29 "2021-03-24T16:45:23Z")

</div>

Hi guys  
Is there any way I could use List Shifter (or any other solution) to sort a RG by a text element which value does not come from the database.  
 ![pharma1](https://us1.discourse-cdn.com/bubble/original/3X/d/6/d6326ca001432380b69d7e3712875c2cf43a81ee.png)  
I’d like to sort the RG by distance. The distance does not come from the database but from an expression placed in the RG cell.

 ![pharma2](https://us1.discourse-cdn.com/bubble/original/3X/9/3/93da15df4e4a72637fa991a9bc65f3c67bebd6ac.png)

---

<div class="post-metadata">

**Author:** ![santiago1](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@santiago1](https://forum.bubble.io/u/santiago1)\
**Post date:** [July 17, 2024, 3:09pm UTC](https://forum.bubble.io/t/sorting-according-to-a-things-thing-field/7208/30 "2024-07-17T15:09:20Z")

</div>

Plugin no longer available.

[Previous page](https://forum.bubble.io/t/sorting-according-to-a-things-thing-field/7208.md?page=1)
