Building collections in PowerApps is a great way to keep data, take it offline, manipulate data and batch it up to your data source of choice. For example, your company can use a PowerApps collection to store employee information and organize them by their names, positions, departments, and any other information you would like to use. Once you've collected this data together, you can use it in a variety of ways to facilitate your organization's work. So, with that said, let's take a look at what you need to do in order to begin using a PowerApps collection. Content:- Now that you've done that, let's take a look at the steps you need to follow in order to show a collection and see that it's working.How to Create a Multicolumn Collection
{
Product: ProductName.Text,
Color: Colors.Selected.Value
}
)
Show a Collection
- Add a verticalGallerycontrol.
- Set the gallery'sItems property toProductList.
- In theData pane, set the subtitle field toColor, and set the title field toProduct.
- Close theDatapane, select the gallery, and then set theLayoutfield toTitle and subtitle.
You may find that the data you've added is wrong or it is unnecessary to track. If you find yourself in this situation, you'll need to be able to remove that information from your collection. Let's take a look at what you need to do in order to remove an item from your PowerApps collection.
Remove One or All Items
- Select the gallery template by clicking or tapping near the bottom of the gallery and then clicking/tapping the pencil icon near the upper-left corner.
- Add aTrash icon to the gallery template.
- Set the icon'sOnSelect property to this formula:
- Remove(ProductList, ThisItem)
- Outside the gallery, add a button, set itsText property to"Clear", and set itsOnSelect property to this formula:
- Clear(ProductList)
- While holding down the Alt key on your keyboard, select theTrash icon for an item to remove the item from the collection, or select theClear button to remove all items from the collection.
While you can work just with PowerApps, you also have the power to connect it to other Microsoft platforms. One great thing you can do is connect it to SharePoint. By connecting a SharePoint list to PowerApps, you can automatically port over the information you need to organize and use without having to transfer it manually. So, with that in mind, let's take a look at the steps you need to follow to create a connection with a SharePoint list.
How to Create a Connection to a SharePoint List
- Sign into PowerApps, select Data, thenConnections in the left navigation bar and then selectNew connection in the upper left corner.
- In the search box near the upper-right corner, type or pasteSharePoint, and then selectSharePoint.
- Perform either of these sets of steps:
- To connect to SharePoint Online, selectConnect directly (cloud services), selectCreate, and then provide credentials (if prompted). The connection is created, and you can add a data to an existing app or build an app from scratch.
- To connect to an on-premises site, selectConnect using on-premises data gateway. SpecifyWindowsas the authentication type, and then specify your credentials. (If your credentials include a domain name, specify it asdomain\alias.). UnderChoose a gateway, select the gateway that you want to use, and then selectCreate. The connection is created, and you can add a data to an existing app or build an app from scratch.
Now that you've created a connection between your SharePoint list and PowerApps, it's time to put that list into the collection you want to use. Let's take a look at the steps you need to follow in order to do that.
Put a SharePoint List Into a Collection
- Make sure you have connected a SharePoint list to PowerApps as explained above.
- Add a button, and set itsOnSelect property to the following function, replacingListName with the name of your SharePoint list:
- Collect(MySPCollection, ListName)
- This creates a collection namesMySPCollection and that contains the same data as your SharePoint list.
- While holding the Alt key on your keyboard, select the button.
- To preview the collection you've created, selectCollections on theFilemenu (This is optional).
Conclusion
By following the instructions we've laid out, you should be ready to get started with the basics of creating and using collections in PowerApps. Now that you know the essentials, you should be ready to start learning the more advanced tools that PowerApps has to offer. Be sure to subscribe to Dock 365's blog and check back everyday for more tutorials on how to use Microsoft's wide array of productivity tools.
Book a Live demo
Schedule a live demo of Dock 365's Contract Management Software now.
Written by Quentin Russell
Quentin Russell is a Content Specialist with knowledge of Content Marketing and Social Media Marketing.