Please fellow PowerApps App creators:
I am having a devil of a time grasping how to filter a gallery of items using several criteria in the filter.
Here is what I am trying to accomplish:
Gallery.Items | Show All Items | dd.Selected.Result = "All Cities" && ddCompleted.Selected.Value = "All" |
| Completed in all cities | dd.Selected.Result = "All Cities" && ddCompleted.Selected.Value = "Completed" |
| Not completed in all cities | dd.Selected.Result = "All Cities" && ddCompleted.Selected.Value = "Not Completed" |
| All items in selected city | dd.Selected.Result = [selected city] && ddCompleted.Selected.Value = "All" |
| Completed items in selected city | dd.Selected.Result = [selected city] && ddCompleted.Selected.Value = "Completed" |
| Not Completed items in selected city | dd.Selected.Result = [selected city] && ddCompleted.Selected.Value = "Not Completed" |
If(
DropdownCities.Selected.Result = "- All Cities -" && ddCompleted.Selected.Value = "All", SortByColumns(colSchools,"Title",Ascending),
If(DropdownCities.Selected.Result = "- All Cities -" && ddCompleted.Selected.Value = "Completed", Filter(colSchools,Completed=true),
If(DropdownCities.Selected.Result = "- All Cities -" && ddCompleted.Selected.Value = "Not Completed", Filter(colSchools,Completed=Blank()),
Filter(colSchools, CITY = DropdownCities.Selected.Result)
)))
The above code sort of works. I would like to know how to employ SWITCH function to accomplish above as there are three other criteria to include in the form of dropdown boxes and a search box.
Thank you for your ideas/help.
Chris