PowerApps List Sorting


A feature that AMT has been including in our PowerApps for clients for a while is the inclusion of allowing the user to sort their list data and presenting it in a gallery control.

This feature has been implemented by setting an initial state on screen, visible:

This will set the initial sorting by client name and ascending.

Then the interactivity has been achieved by adding an icon next to each sortable control. These have been configured with the icon property dynamically set depending on the sort by and sort direction.

This sets it to the bi-directional arrow if it has not been selected, then either an up or down arrow depending on the sort order.

Finally, the onSelect property is set to change the ‘sort by’ and set an initial ascending sort order of ascending, if we are changing the selected sort by column. Or just swap the ‘sort by’: