
I have an excel sheet in my onedrive for business that has been highly useful for searching for schedule information. However on a phone it can be tricky handling the the standard filters in an excel table. I was hoping to build a powerapp based on the excel sheet for easier searching/filtering. The simple requirements are this:
There is 1 table. It has 5 columns. 4 of them should be able to be searched by dropdown or listboxes to allow multiselections. There should also be a search box that does a general search across all the fields. The 4 dropdown boxes should be allowed to work as solo or in combination.
Is this really super complicated?
This app should be read only, no need for an editable area or anything like that.
Hi @Anonymous,
To add four dropdown for filter purpose should possible, but I don't think multSelection would work.
To have multi-Selection save in Excel should work, but for searching, it would require the selected string in a proper order, in order to match the value stored in Excel.
Some examples here, to add a search which would work for all the area, try the search function:
Search(Table1, TextSearchBox1.Text, "Field1","Field2","Field3",...)
For dropdown, we could take use of the fitler function:
Formula should be:
Filter(Table1, Field1=Dropdown1.selected.value, Field2=Dropdown2.Selected.value,...)
the results of all formulas are combined with the And function.
Reference for the functions:
Filter,Search, and Lookup functions in PowerApps
For situation you described, it is recommended to create a single screen with each category in hierarchy.
For example, we could start from field 1, after Dropdown1 has been selected (with no Gallery), Navigate to screen2, with a gallery1 fitlered by Field1, then Dropdown2 with values from field2, once Dropdown2 has been selected, it would navigate to screen3, with gallery2 filtered by field2 and field1.
Formula for Gallery1 under screen2, the items property should be:
Filter(Table1, Field1 = dropdown1.selected.value)
Formula for Gallery2 under screen3, the items property should be:
Filter(Gallery1.allitems, field2 = Dropdown2.selected.value)
Gallery3 under screen4:
Filter(Gallery2.AllItems, field3=dropdown3.selected.value)
.....
Regards,
Michael