Rookie Database Question

I have set up a database for a specific tour. The tour has days 1 to X and I am trying to display the data in a repeater in day order i.e. day 1 first day 2 second and so on. I have been using the sort option in the database but I think that just seems to sort the data in the database. I assume I need code to sort in the repeaters. Can anyone share the code I might need to help get me started. Many thanks, Happy Friday everyone :slight_smile:

@juliet Are you populating the repeater via a dataset? If yes, select the dataset and choose settings. Scroll down to the bottom of Dataset settings and you will have the option of setting a sort order. If you’re not using a dataset to populate it, I suggest that you do so. Writing a query and assigning the repeater the results of the query is the other way to do it. Datasets are easier for newcomers to work with typically.

Ha that was so easy thanks you. I kept sorting in the database. Awesome thanks again :slight_smile:

Another quick question if I am pulling on the tours from the database, the days of the different tours vary. Is there a way of empty day fields not to show as blank elements on the page. Hope this makes sense. Thanks :slight_smile:

Maybe you can explain what type of element you’re using. There is an onItemReady function where you can apply conditions for hiding elements, assigning values, or anything else that you might want to do with the repeater item (row).

Hi Anthony at the moment this is a concept idea i am building so the tour days info is in a repeater pull from a database. Each day is in an individual repeater. I could also use a container with a text field/s and image for each tour day info.

As the number of days in a tour vary I am left with empty containers/repeaters for the days that have no tour.

I can do each tour individual but that seems awkward as I have to create a database for each tour and I am trying to make things easier for the client.

Each trip they run has a lot of tours but this might be the best day. As I can’t duplicate a database, I just read I can export and import so could do that and set up for the client.

Just hoping there is a better way, thanks again for your help :slight_smile: