Sorting your data the way you want
Since version 1.4, ConfiForms plugin supports sorting of records stored.
TableView and ListView macros now have a new parameter 'Ordering/Sorting rules to apply on entries dataset' to control the ordering of records shown. It uses SQL like syntax with reserved words ASC and DESC for sorting directions
Again, this tutorial will be based on 'Creating a simple form'. But we have added one more field (nrOfPages), that stores numbers.. and it is for storing number of pages in a book.
Let's enter some data:
bookTitle: Programming in Objective-CbookAuthor: Stephen G. KochannrOfPages: 100bookISBN: 0321967607
bookTitle: Android Programming: The Big Nerd Ranch GuidebookAuthor: Bill PhillipsnrOfPages: 200bookISBN: 0321804333
bookTitle: Windows Store App Development: C# and XAMLbookAuthor: Pete BrownnrOfPages: 150bookISBN: 1617290947
Here are some examples on how the data could be sorted (Of course, sorting could be combined together with filtering and used together. Learn here how to use filters).
|To sort the dataset by number of pages, in ascending order||nrOfPages ASC|
|To sort the dataset by book author name and number of pages, in ascending order||bookAuthor ASC, nrOfPages ASC|