Dynamic sorting (a-z vs price vs review score etc)


I’m new to Bubble and apologise if my question has been asked before - I’m creating a web app similar to a hotel booking site, where buildings are listed and customers can book accommodation.

I have a relational database set up with buildings, cities, room types, prices and pictures and all of the relevant relationships in place to make sense of each table. I have also managed to present the customer a list of suitable properties based on the filters they have set.

My issue now is sorting from two aspects:

1 - I can’t seem to sort a list of buildings by anything other than what is in my building table. For example, i’d like the customer to be able to sort by price. My building listing does a search for prices and brings back the minimum for each building, but because the repeating group is set to buildings, not prices, I cannot sort on the linked field.

2 - I want to allow the user to be able to choose how their list should be sorted. For example, some users may want to know the distance from the city centre, whilst others will want to know which are cheapest. I can’t see any way to allow the user to select which sorting type to choose and then build and apply that logic to my list of buildings and related information.

Any help would be really appreciated.

Thanks in advance.

This topic was automatically closed after 70 days. New replies are no longer allowed.