In this episode of Pragmatic Works' Building Power Apps in Microsoft Teams, Matt Peterson walks through how to search, sort, and filter galleries in Power Apps. This tutorial focuses on creating user-friendly experiences for managing data such as student check-ins.
Matt starts by creating a new screen for displaying the student check-ins. He duplicates the existing screen and renames it to scr check-ins. After removing unnecessary elements, he adds a gallery to display the check-in data.
To ensure a smooth user experience, Matt adds a navigation button to the main screen. When clicked, it takes the user directly to the scr check-ins screen, enabling seamless transitions within the app.
To display the check-in data, Matt connects the gallery to the student check-in and outs data source. He customizes the layout to show relevant details like:
He also formats the check-in date to make it more readable using Power Apps' text formatting options.
Next, Matt demonstrates how to sort the data by the check-in date in descending order. This ensures that the most recent check-ins are displayed at the top of the gallery, making it easier for users to find the latest entries.
To make it easier for users to find a specific student, Matt adds a search feature. He inserts a text box where users can type a student’s name. The gallery will then filter the data to display matching records. Initially, Matt uses the search function, but since lookup columns are not supported for searching, he switches to using the filter function with a custom formula.
When the search functionality doesn't work with lookup columns, Matt demonstrates an alternative approach using the filter function with the startswith command. This command checks if the student's name starts with the text entered in the search box, overcoming the limitations of the search function.
Matt then improves the search functionality by allowing the gallery to search both the first and last names. By using the or operator (represented by ||), the search will now return results from either the first name or the last name columns, making the search feature more robust.
Matt addresses a potential issue with delegation warnings that may occur when dealing with large data sets. By switching from the in command to the startswith function, he avoids the delegation warning and ensures that the app performs efficiently even with larger datasets.
Matt concludes the episode by summarizing the key steps covered: creating a gallery, sorting data, and implementing search and filtering. He highlights the importance of using Power Apps' built-in features, like startswith and filter, to build more interactive and user-friendly apps.
If you enjoyed this tutorial and want to stay up to date with Pragmatic Works' Power Apps training, don't forget to like, subscribe, and check out additional resources in the description below.
Don't forget to check out the Pragmatic Works' on-demand learning platform for more insightful content and training sessions on Power Apps and other Microsoft applications. Be sure to subscribe to the Pragmatic Works YouTube channel to stay up-to-date on the latest tips and tricks.