Sorting the same items within different categories (ordered sets)

Hello everyone :wave:

I have a table of items. You can imagine these are for instance contacts in a phone app, or learning cards in a learning app. These items are in a table and added to this table before anything else.

I then have categories that are groups of these items. These categories might be groups or sets, I’m not certain of the terminology to use, but sorting here matters. To stay on the previous example, you can imagine these are groups of contacts, or modules of learning cards. When a category is created, a choice component with multiple select on the add screen adds a CSV of items to the new category.

I seek to have many categories with different arrangements of items: different items, different sorting of these items within the category, some items might appear many times in different categories. Again based on the examples above: different groups of contacts (a contact can appear in many groups), or different modules of learning cards (a learning card can appear in many modules).

I am struggling with the aspect of sorting items in different categories. When I create category C1, in the form screen I’ll add items i1, i2 and i3 lets say. When I create category C2, I’ll add the same items i1, i2 and i3 which I would like sorted differently.

It feels that when I create (or perhaps edit) a category, I would need to define sets [item;sort_number] for that category. Any idea if or how I could achieve this?

Maybe you would have to add items in each group on their own rows. The way you’re doing it now, it’s just a comma-delimited list of item IDs in each group and it can’t contain any further info.

So every time a new group were created, first the items would have to be duplicated? I think this would work fine, but I don’t think it’s optimal from a UX or data perspective.

Imagine creating new groups in Whatsapp and having to duplicate the contacts before adding them to new groups. That doesn’t feel right: it’s annoying for the user (poor UX) and it fills the items table with duplicates other than the Row ID (data bloat).

I’m not saying there must be a better way in Glide, I’m just wondering if there is. The use case seems simple enough, oddly :thinking:

Personally I don’t think it’s a simple use case, anything related to custom sorting is complex to me.

It’s not a data bloat if you’re linking it to different groups I guess? It represents the link between a contact and a group, so nothing is duplicated here.

I have never had a use case where I have to do custom sorting on different groups of data though, so maybe it’s just not what I’m used to.

1 Like

Yeah this use case is an interesting one. I say “simple” because it sounds reasonable enough that we could have {contacts within groups}, {learning cards/lessons within modules}, {employees within teams}, etc. and we don’t know ahead of time how many groups/modules/teams there will be, we know contacts/lessons/employees are going to be allocated to these groups/modules/teams, and for whatever reason we might want to sort the groups differently (alphabetically, table order, custom). Here I’m looking for custom sorting, and I think I found a solution: throw in the towel! :smile:

1 Like