I recently came across a post asking about in-app sorting.
So I thought I’d create a quick video explaining how to add In-App Sorting to a Glide app so users can sort data as they please!
This seems to be a fairly simple way of getting it done, but I have no doubt there are numerous other ways to achieve the same end result (for example by using the new Query Column when working with larger sets of data)…
That’s the beauty of Glide, there’s always a way!
And of course that got me thinking… haha
mmm, two query columns, I think. Each returning the same but just sorted in the opposite direction. Then an if-then-else column to decide which one to use as the source of a collection. And then we’d only need a single collection.
But everything else the same, I think - I do like the way you set that up.
I played around with the two query columns initially (asc & desc) but it didn’t allow me to select the query column as a value in my if/then/else column (and the rest of the setup remained fairly similar i.e. conditionally hiding/showing tables on the front-end) so I thought I’d leave it as is…
I think @Robert_Petitto did mention in his tutorial that the query column seems to give out a multi relation in terms of output and maybe that why it won’t show in the if-then-else column to be used…
For performance purposes we would want to avoid loading 2 long collections with images for instance. So like Darren I wonder if we could push the ascending/descending logic to the Data Editor to avoid having 2 collections. Query or Sort Array might be the way to go.
And that’s interesting to hear about the multi-relation… If Glide allows Query columns to be used in if/then/else columns as values it would unlock a lot of power
Thank you @nathanaelb! Yeah I agree regarding the two collection tables… I feel like there’s definitely a way to do it without conditionally showing/hiding two collections on the front end.
Hi Guys, Hi @Loqode ,
Followed your video, didn’t get it working with different users…I was thinking “what the hell…” then I noticed I missed the “make row owner” in users table…set it and Boom, perfect!
Thanks!!