Hi there,
I connected the Bookings/Services dataset to the repeater. Is there an easy way to sort a dataset by date? startDate Low → High?
Thanks.
Hi there,
I connected the Bookings/Services dataset to the repeater. Is there an easy way to sort a dataset by date? startDate Low → High?
Thanks.
@eugene-m Which field in the database do you want to sort by? Also, give me the dataset ID from the Properties Panel .
@shantanukumar847 The Bookings/Services dataset doesn’t contain a date field. At all. She is hidden.
Although the date is added when creating a new course through the Wix Booking admin panel.
@eugene-m You can unhide hidden fields from the collection’s Visible Fields menu entry. It’s only hidden from view, but it’s still there and available to be used in queries, sorts, and filters.
@yisrael-wix Hi, thanks. There is no date in hidden fields either. You can verify this example site
@yisrael-wix By “hidden” I meant that the database does not contain a date field at all.
Hi! Can anybody help me?
Hey Eugene, sorry, but I got busy. Meanwhile, I was trying to see if I could find anything to help you. You’re right that there is no date/time field, but there is a Service Schedule field. You’ll need to do some serious date manipulations, but it’s doable.
I found Corvid Tutorial: Creating a Bookings Timetable which seems like it will guide you a good deal of the way to what you’re trying to accomplish. Here’s the accomanying Timetable example which you can load in your Editor so you can play with it and customize it to your own needs.
I hope this helps.
@yisrael-wix Hi! Thanks for your help. I saw these examples, but I was hoping there was a simpler solution. I think that building a list of events by date should be part of the standard functionality.
@eugene-m don’t tell anyone, but I think I agree with you. Feel free to post a Feature Request .
@yisrael-wix
That would be good option to have in the Wix Bookings Services collection.
The Service Schedule in the Wix Bookings Schedule collection can’t be sorted.
https://support.wix.com/en/article/corvid-wix-bookings-schedule-collection-fields#service-schedule-serviceschedule
As @eugene-m is wanting a simple solution, then I doubt that they are wanting to have to manipulate any code or look at using Wix Data Options etc, however you never know we could be wrong as that reference field can connect to data, so it is possible to take the json object from it and use it ti filter somehow.
The only workaround I can see if they are not wanting to change their existing setup to a timetable or similar, would be to simply change one of the fields that is allowed to be sorted in the collection.
https://support.wix.com/en/article/corvid-wix-bookings-services-collection-fields
I would suggest that instead of putting it in the slug and changing all the url links etc, that I would somehow word it into the service name field so that it can at least be sorted through that field.