I want to sort a list in App Maker by month, and I don't know how to it.
I think that was the way, but is not.
@datasource.item.MONTH#sort()
I am not sure how many ways there are to achieve this but here are two ways:
First one: Go the the model datasource and change the sorting option to reflect the month and then choose by ascending or descending. See the example below.
Second one: Select the table widget and the go to the events section in the Property Editor. Click on the onDataLoad event and type the following code:
widget.datasource.items.sort(
function(a, b) {
if (a.Month > b.Month) {
return 1;
} else {
return -1;
}
}
);
Whichever way you prefer, is your choice. Hope it helps!
Note: the second option will sort only records withing single page currently loaded to the client.