Skip to main content

Command Palette

Search for a command to run...

From SharePoint to Power Apps: A Complete Guide to Using Collections

Updated
4 min read
From SharePoint to Power Apps: A Complete Guide to Using Collections

Master Power Apps Collections: Real SharePoint List Examples for M365 Automation

Collections in Power Apps are temporary, in-memory tables that allow you to store, manipulate, and display data inside your app. Unlike directly connecting to a SharePoint list, collections let you work offline, filter, sort, and combine data before writing it back.

In this article, we’ll cover:

  • What collections are

  • How to create them from SharePoint lists

  • Common operations (filter, sort, update)

  • Practical examples for M365 automation


What is a Collection?

A collection in Power Apps is like a mini-table stored in the app’s memory. You can think of it as a temporary copy of your data that can:

  • Store a subset of SharePoint list items

  • Hold user input before submission

  • Combine data from multiple sources

  • Be cleared or updated on demand

Key points:

  • Collections exist only while the app is running unless saved to a data source.

  • They can have multiple columns (fields) like a SharePoint list.

  • They are created and manipulated using Power Apps formulas like Collect(), ClearCollect(), UpdateIf(), and Remove().


Creating a Collection from a SharePoint List

Suppose you have a SharePoint list called “EmployeeTasks”:

TitleAssignedToDueDateStatus
Task 1John Doe2026-01-20In Progress
Task 2Jane Smith2026-01-25Not Started
Task 3John Doe2026-01-30Completed

You can create a collection in Power Apps to hold all tasks assigned to the current user:

ClearCollect(
    MyTasks,
    Filter(EmployeeTasks, AssignedTo.Email = User().Email)
)
  • MyTasks is the collection name

  • Filter() retrieves only the current user’s tasks

  • ClearCollect() clears the collection first, then adds the filtered items

You now have a local copy of the tasks in memory that you can use throughout your app.


Once the collection is created, you can display it in a Gallery:

Gallery.Items = MyTasks

Inside the gallery, you can bind labels to the collection fields:

ThisItem.Title
ThisItem.DueDate
ThisItem.Status

Updating Collection Data

You can update a specific item in a collection without affecting the SharePoint list yet:

UpdateIf(
    MyTasks,
    Title = "Task 1",
    {Status: "Completed"}
)

This updates the collection in-memory. You can then write the changes back to SharePoint using Patch() or ForAll().


Adding Items to a Collection

Collections can also be used to store new entries before submitting to SharePoint:

Collect(
    MyTasks,
    {
        Title: "Task 4",
        AssignedTo: {DisplayName: "Jane Smith", Email: "jane@company.com"},
        DueDate: DateAdd(Today(), 7, Days),
        Status: "Not Started"
    }
)

This adds a new record to the collection. Later, you can batch-submit it to SharePoint.


Removing Items from a Collection

To remove an item from the collection:

Remove(MyTasks, LookUp(MyTasks, Title = "Task 2"))
  • This only removes the item from the collection, not the SharePoint list

  • You can later remove from SharePoint using RemoveIf()


Combining Multiple Lists into a Collection

You can combine multiple SharePoint lists into one collection for dashboards:

ClearCollect(
    AllTasks,
    EmployeeTasks,
    ProjectTasks
)

Now AllTasks contains rows from both lists, making reporting easier in a single gallery.


Tips for Using Collections

  1. Use ClearCollect at app start to ensure you’re not duplicating data.

  2. Keep collections small; large datasets can slow the app.

  3. Use collections for offline work: store data locally, submit later.

  4. Always write back to SharePoint when permanent changes are needed.

  5. Name collections clearly for maintainability (MyTasks, CompletedTasks, etc.).


Summary

Collections are an essential tool in Power Apps for working with SharePoint data dynamically:

  • Create filtered subsets of SharePoint lists

  • Store and manipulate data locally

  • Combine multiple data sources

  • Update, add, or remove items before writing back

Mastering collections makes your apps more responsive, flexible, and user-friendly, which is crucial for M365 automation scenarios.