Changing the order of a list of data (WITHOUT a sort index field...)

Have been trying to think of a way that I can easily change the ORDER of the way this data is stored for a user. In this project, users are part of spaces. But users share spaces (which is why having a central sorting index doesn’t work here), the sort preference is on the USER’s side.

Currently, I am trying to allow users to drag and drop their spaces to change the order in which they are appearing in the repeating group on the side. But in my database, I just have a list of spaces.

I’ve tried to remove the space, and then add it back (which obviously just takes it out of place and puts it at the bottom), but is there a way to change the actual ORDER of that list? or set that list based on states? Been racking my brain trying to figure out a solution.

Example of what I’m working with:

Screenshot 2024-02-01 at 8.54.46 PM

Thanks for the help!

You just create a new data type called Ordered Space which just has an Order (number) and Space (Space). Then, user data type will have a list of Ordered Spaces instead of Spaces. This way, each user might have his own order of shared spaces.

That’s what I was planning on doing… Just feels messy to me to have to go and create those JUST for the sake of sorting. When that’s all that entire data type would be for.

Yes it is not the best. I hope bubble will have more sophisticated sorting sometime.

1 Like