Forum Academy Marketplace Showcase Pricing Features

Sorting a list?

How to efficiently sort a list ?

  • I’ve a thing car with a list field of colors (another thing).
  • The thing color has two fields id, name.
  • I need to display in a RG the colors (of that car) sorted by id.

But I’m surprised it’s not possible to do: search for car: each colors SORTED by id.

The only option seems to dosearch for colors: where car = car; SORTED by id, but it’s a nightmare of slowness if I have many colors.

Do you have a more efficient solution to use the first option?

So if you’re storing a list of colors under the car, couldn’t you just put a repeating group (type Color) and the data source being "Parent group’s Car’s Colors:sorted (by ID)

Yes, but how ?

There is no option to :sorted on Parent’s group’s Car’s Colors

There is no option to :sorted on Parent’s group’s Car’s Colors

Yes there is… just add the Sorted operator after the data source…

Although, what exactly are you sorting by? What is the ID? (a number or a text?)

Thanks for this question “what are you sorting by” @adamhholmes. I made the mistake of trying to sort by image (the car/color is a simplified version of what I’m dealing with).

Indeed it’s impossible to sort by image, so I didn’t have the option. I’ve re-worked to sort on a field that’s sortable, it’s now working.

1 Like