In this tutorial, Matt Peterson, a trainer at Pragmatic Works, walks through how to use collections in Power Apps Canvas Apps to improve user experience and streamline data entry. Drawing from a real-world scenario, Matt demonstrates how predefined comments can be quickly selected by users instead of manually typed, making applications more efficient and user-friendly.
Matt Peterson begins by explaining the purpose of collections in Power Apps. Collections allow developers to temporarily store data in-memory, making it easier to manipulate and reuse within an app. In this case, collections are used to store predefined comments that users can select when filling out a form.
Using a park inspection app as an example, Matt shows how to enhance a form by adding suggested comments. Instead of requiring users to type repetitive feedback, the app provides selectable options.
Matt introduces the Table function to define static records that will serve as the data source for the gallery.
This approach allows developers to quickly define reusable comment options without relying on an external database.
Next, Matt Peterson demonstrates how to make the gallery interactive by adding checkboxes.
ThisItem.Comment.To capture user selections, Matt uses the Collect function.
OnCheck property of the checkbox is configured.colComments is created.This effectively builds a temporary dataset of user-selected comments.
Matt then shows how to display the selected comments inside a form field using the Concat function.
This allows multiple selected comments to appear seamlessly in one input field.
Matt Peterson addresses several common issues that arise when working with collections:
Clear function in the screen’s OnVisible property.ThisItem in colComments logic in the Default property.Remove function in the OnUncheck property.By the end of the demonstration, Matt successfully creates a fully functional system where users can:
Matt compares this process to a “shopping cart” experience, where users pick items and submit them all at once.
Matt Peterson highlights how collections can significantly improve usability in Power Apps. By reducing manual input and enabling quick selections, developers can create more efficient and intuitive applications. He encourages viewers to explore more use cases for collections and continue learning through Pragmatic Works’ training resources.
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.