Hey everyone!
I am having issues with filtering by buttons. I have three buttons representing statuses: red, yellow, and green. In my sharepoint list I have a calculated column named HealthStatus that feeds out a number 0(green), 1(yellow), or 2(red) based on certain specifications. I am trying to have these buttons, when selected, only show gallery items where the calcuated column equals the corresponding number.
I found this forum post where the user had a very similar issue so I tried to follow the solution. I set my buttons to
Set(redStatus,2)
and when I tried to edit my gallery items formula, no matter what I put in, I get errors and it breaks my gallery. Here is my current gallery code
SortByColumns(
Filter(
[@'DCHealth'],
StartsWith(
DC,
TextSearchBox1.Text
) && (Region in RegionCombo.SelectedItems.Value || RegionCombo.Selected.Value = Blank())
),
"field_3",
If(
SortDescending1,
SortOrder.Ascending,
SortOrder.Descending
)
)
I tried placing If(redStatus=2,'DCHealth', Filter('DCHealth',HealthStatus=redStatus)) after my region filter but I get a multitude of errors.
How should I edit this or change my course of action to get these filter buttons running?
Thanks!