*Disclaimer* – This post based on Preview version of PowerApps. I’ll make every effort to update with any changes and verify when PowerApps is released.
One of the powerful features in PowerApps for SharePoint users is the ability to create an app from a SharePoint list. When using this feature, PowerApps creates three screens for us to start with: A Browse screen, a View screen, and a New/Edit Item screen.
The Browse screen contains a Gallery control – which displays the contents of a list. By default it shows ALL items in a list. This might be fine for some business needs – especially with the inclusion of the search functionality also built into the default screen. Some use cases however may look for a filtered view of a list.
The Short Version
The browse screen is set up to show all items, as well as take input from the search box. I’m going to change the list to display all items where the Request Type is a certain value.
- Select the Gallery on the browse page
- Change the Items formula from search-based to filter-based:
SortByColumns(Search(‘Service Requests‘, TextSearchBox1_1.Text, “Comments”, “Notes”, “Title”, “Title”), “Comments”, If(SortDescending1, Descending, Ascending))
SortByColumns(Filter(‘Service Requests’, ReqType.Value=”PEBKaC”), “Comments”, If(SortDescending1, Descending, Ascending))
- Items displayed on the screen should now be filtered by the Request Type.
- Similar to other methods in SharePoint (like CSR with JSLink) the field names seem to be using the internal name of the field. Above, when accessing the Request Type we needed to use ‘ReqType’.