Sorting a list of text

So Im building a tutoring website, and my tutors can add or remove times from their availability, the problem is that this results in these being mixed up, is there any way to order them?
because when I display them in repeaters they aren’t in order

Sorting is interestingly still not very sophisticated in Bubble.

If you are willing to update the data type:
The easiest way would be to add another column called Order of type number to Tutor Availability and set it to the corresponding number while setting the availability. For example, if it is Monday, set it to 1, Tuesday set it to 2 etc. You can do this by using option set as well by adding some order attribute to the days (See below) Then, you can easily sort this by this new column.

If you don’t want to update the data type:
This method would only work if you have one week day per tutor. (for example, only 1 monday, 1 tuesday etc. per tutor).
In this case, you will create an option set of days from monday to sunday. In a repeating group, you will display these. And in each repeating group cell, you will get the corresponding day’s availability. See the option set below:

And see the repeating group:

And its preview:

If you want to check the editor, here it is:

1 Like

Literally just did this :smiley:

1 Like

I really wanted to avoid creating individual data since it will be flooded if i have multiple tutors…every tutor might have around 20 slots or even more !
So I really wanted to make the lists work.
But what can you do.

thanks for the post :slight_smile:

The difference in my case is that I had to order the times.

Are the days and times just regular text?

Yes, but the order gets messed up when the user adds and removes times from the list

But order is now restored :slight_smile:

Good luck then.

Shouldnt I use text ?

I would use option sets. Day option set, Timeslot option set. But again, it is just me. Design are subjective. I didnt say good luck for this. I said because you seem to fix your ordering problem.

Ah I see, I never really used option sets, I dont really get them, I will look more into them, thanks :slight_smile: