Hi @Anonymous ,
Do you want to customize the sort order?
Firstly, for sort function, it only has two sort order: SortOrder.Descending and SortOrder.Ascending.
So you could add a column by using If statement with number value then sort based on this new column. Just as @WarrenBelz said.
For sortbycolumns function, it could add your sort order: SortOrderTable.
However, since your Approval field is choice field, so you could not sort based on this column directly. You need to add a column with value of Approval.Value , just as @yashag2255 said.
1)use Sort function:
Sort( Table, Formula [, SortOrder ] )
formula:
Sort(
AddColumns(
Filter('Equipment Reservations', 'Reserved By'.Email = currentUser.Email && Returned = 0),
"sortorder",
If(Approval.Value="Submitted",1
Approval.Value="Approved",2
Approval.Value="Denied",3
)//add a number column based on Approval.Value
),
sortorder, //sort based on sortorder column
Ascending)
2)use SortByColumns function:
SortByColumns( Table, ColumnName, SortOrderTable )
formula:
SortByColumns(
AddColumns(
Filter('Equipment Reservations', 'Reserved By'.Email = currentUser.Email && Returned = 0),
"SortColumn",
Approval.Value
), //add a column with value of Approval.Value
"SortColumn" , //sort based on SortColumn table
[ "Submitted", "Approved", "Submitted", "Denied"] //sort order table
)
Here's a doc about these two functions in details for your reference:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-sort
Best regards,