I would like to be able to SORT my columns that have the choices/dropdown type fields but I am having an issue below.
WITHOUT SORT FILTER :
WITH SORT : (ISSUE)
Currently, I have it in the Items property that when the user clicks on the Sort icon- the Switch function below will trigger and fire off the correct sorting sequence. I have sorted other fields as well that involved normal text fields using SortByColumns function. These two were combined in one chunk of code in the Items property.
Switch(
"OrderStatus",
Sort(
Search(
Filter(
col_YQQ,
If(
Gallery1.Selected.Filter = "ALL OPEN ORDERS",
Status.Value <> "Completed",
If(
Gallery1.Selected.Filter = "NOT STARTED/ BLOCKED",
Status.Value = "Not started" || Status.Value = "Blocked",
If(
Gallery1.Selected.Filter = "NO/ SHORT STOCK",
Status.Value <> "Completed" || 'In Stock?'.Value = Blank()),
If(
Gallery1.Selected.Filter = "EDD UNKNOWN",
Status.Value <> "Completed" && IsBlank(EDD),
If(
Gallery1.Selected.Filter = "EDD THIS MONTH",
Status.Value <> "Completed" && Month(EDD) = Month(Now()),
(Status.Value = "Ready for pick up" || Status.Value = "Partially completed")
)
)
)
)
)
),
TextInput12_5.Text,
"Part_x0023_Requested",
"Part_x0020__x0020_Description_x0",
"ReasonforRequest",
"Sales_x0020_order",
"Owner",
"PurchaseOrder",
"Tracking_x0020_ref",
"ReasonfornoEDD",
"Issued_x0020_to",
"RequestedBy",
"Notes"
),
"OrderStatus",
If(
varSortDirection = Ascending,
Ascending,
Descending
)
)
Icon property of image-icon.
If(
varSortColumn <> "OrderStatus",
Icon.Sort,
If(
varSortDirection = Ascending,
Icon.ArrowUp,
Icon.ArrowDown
)
)