Sorting according to a Thing's Thing field

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.

3 Likes

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. :tada:

(RITE HEEERE: List Shifter: Reverse, Rotate, Swap and ITERATE (Loop) Over Bubble Lists | Now at v1.4: Adds Numeric Option, GET INDEX Action)

5 Likes

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

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

1 Like

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

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.

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

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

But when I test it, no items are displayed on my page, and the debugger shows this error message :
image
(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

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

Thanks a lot for your answer

1 Like

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

1 Like

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
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.

6 Likes

Plugin no longer available.