Dynamically Set Sort Order

Is there a way to dynamically set which field is used, and if ascending or descending, of a list?

For example, a list with {firstName}, {lastName} and {dateOfBirth} - I want the user to set the order dynamically - such as from a dropdown stating [Order by: XXXXXXX] and another for [Ascending/Descending]?

2
1 reply