Hi guys,
Below is a photo of my powerapp. i'm trying to be able to filter so that when pressed, the gallery will only show items that have the choice "approved" or "Pending" when the appropriate button is pressed.

my button currently has this code:
UpdateContext({FilterByApproved:!FilterByApproved})
and my gallery currently has this code:
SortByColumns(
Filter(
'Expense List',
(If(FilterByApproved = true, Text(Approval.Value) = "Approved", Approval.Value <> "") || (Approval.Value = "Pending" Or Approval.Value = "Approved" Or Approval.Value = "Rejected")) && Text(Submitter) = User().FullName
),
"Date",
If(SortDescending, SortOrder.Descending, SortOrder.Ascending)
)
I've also in the approved button above tried the following code but to no avail:
ClearCollect(
FilteredItems,
Filter(
'Expense List',
(
Approval.Value = "Approved"
)
))
Note: Id want to do this for all buttons i.e. not just approved but also pending and all. The choice column in SP is named 'Approval'
Let me know if you can help!
Thanks,
Cormac