Power Apps Collection Contains [With Various Examples]

Working with data in Power Apps often means you need to search, filter, or check values inside a collection. And if you’ve tried looking for a built-in Contains() function the way you’d expect in Excel or SQL, you’ve probably noticed it doesn’t work the same way in Canvas apps.

Don’t worry — Power Apps gives you even better tools for this. In this tutorial, you’ll learn everything about Power Apps Collection Contains, including how to filter a collection by a specific value, check if a value already exists, set a variable based on a collection value, and a few extra tips to make your apps smarter.

Let’s get started.

What Does “Collection Contains” Mean in Power Apps?

Before jumping into examples, let’s quickly understand what we’re trying to do.

collection in Power Apps is a temporary table stored in the app’s memory. You can load data into it from SharePoint, Dataverse, or build it manually. Once you have a collection, you’ll often need to ask questions like:

  • Does this collection have a record where the name is “Samsung”?
  • Has this email address already been added?
  • Does any row contain the word “Laptop”?

Power Apps handles all of this using two operators: in and exactin. These operators work just like a Contains() function — and in many cases, they’re more flexible.

Power Apps in vs exactin Operator — What’s the Difference?

This is something many beginners get confused about, so let’s clear it up right away.

OperatorCase Sensitive?Example
inNo"samsung" in Manufacturer.Value → matches “Samsung”, “SAMSUNG”
exactinYes"Samsung" exactin Manufacturer.Value → matches only “Samsung”

A simple rule of thumb: use in it when you want a loose, forgiving search. Use exactin when the exact casing matters — like matching product codes or email addresses.

Both operators also support partial text matching. So "Sam" in Manufacturer.Value would match “Samsung” because “Sam” is a substring of “Samsung”. This is really useful when building search bars.

Power Apps Collection Contains

Let’s discuss real-world use cases for how we can work with Power Apps Collection Contains.

Example 1: Filter a Power Apps Collection That Contains a Specific Value

Let’s start with the most common scenario — filtering a collection to show only records that match a specific value.

The Setup

Suppose you have a SharePoint list called Product Details with the following columns:

Column NameData Type
TitleSingle line of text (default)
ManufacturerChoice column
PriceCurrency column
PurchaseDateDate and time column
Power Apps Collection Contains the Specific Value

You want to load this list into a collection and then filter it to show only Samsung products when a button is clicked.

Power Apps Collection Contains Specific Value

Step 1: Load the data into a collection on App Start

Select the App object from the left navigation panel, choose the OnStart property, and enter the following formula:

ClearCollect(
colProductThings,
'Product Details'
)
Power Apps Collection Contains a Specific Value

This loads all rows from your SharePoint list into a collection called colProductThings when the app starts.

Step 2: Display the collection in a Data Table

Insert a Power Apps Data Table control on the screen. Set its Items property to:

Items = colProductThings

Click Edit fields and add the columns you want to show.

Power Apps Collection Contains

Step 3: Add a Button to Filter the Collection

Insert a Button control and label it something like “Show Samsung Products”. Set its OnSelect property to:

ClearCollect(
Productscol,
Filter(
'Product Details',
"Samsung" exactin Manufacturer.Value
)
)

Here’s what each part does:

  • ClearCollect — clears any existing data in Productscol and fills it fresh
  • Filter() — goes through the data source and picks rows that match your condition
  • “Samsung” exactin Manufacturer.Value — checks if “Samsung” appears exactly (case-sensitive) in the Manufacturer column
How to Filter Power Apps Collection Contains Specific Text

Step 4: Show the Filtered Results

Insert a second Data Table and set its Items property to:

Items = Productscol
How to Filter Power Apps Collection Contains Specific Value

Now, when a user clicks the button, the second table populates with only Samsung products. Clean and simple.

Pro Tip: If you want a case-insensitive match (so “samsung” or “SAMSUNG” also works), swap exactin for in. This is especially useful if your data entry isn’t consistent.

Example 2: Check If a Value Already Exists in a Collection

This is a really practical use case. Imagine you’re building a form where users enter their email address. You don’t want duplicates in the collection. So before adding a new email, you check if it’s already there.

The Setup

You have a Power Apps collection called colEmployeeEmail with a column named Enter User Email. There’s a Text Input control (txt_Email) and a Submit button on screen.

Power Apps Check If Value Exists in Collection

The Formula

Set the OnSelect property of your Submit button to:

If(
CountRows(
Filter(
colEmployeeEmail,
'Enter User Email' = txt_Email.Text
)
) > 0,
Notify(
"This User Email Address Already Exists. Please Enter a New Email Address.",
NotificationType.Information
),
Collect(
colEmployeeEmail,
{'Enter User Email': txt_Email.Text}
)
)

Let’s walk through the logic:

  1. Filter() looks through the collection for any row where the email matches what the user typed
  2. CountRows() counts how many matching rows were found
  3. If the count is greater than 0, the email already exists — so a Notify message pops up at the top of the screen
  4. If the count is 0, the email is new — so Collect adds it to the collection
How to Check Power Apps Collection Contains Existing Column Value

Step 2: Display the Collection

Insert a Data Table, set Items to colEmployeeEmail, and add your columns via Edit fields.

Now test it — type an email and hit Submit. It gets added. Type the same email again — you’ll see the warning notification instead. No duplicates.

Power Apps Collection Contains Existing Column Value

Why CountRows instead of just checking with in?

You could write txt_Email.Text in colEmployeeEmail — but that checks the entire record, not a specific column value. Using Filter + CountRows gives you control over which column to check. It’s more precise.

Example 3: Set Power Apps Variable Based on a Collection Value

Sometimes you don’t need to display filtered data — you just need to know whether a value exists, and store that as a Yes/No result in a variable. This is useful for conditional logic, showing/hiding controls, or triggering actions.

The Setup

You have a Power Apps collection called Issuecol loaded from a SharePoint list called Issue Tracker. It has two columns:

Product IssueProduct Name
Laptop is not workingLaptop
Outlook issueOutlook
Mobile remote issueMobile
Laptop mouse is not workingLaptop
Repair Outlook ProfileOutlook
Power Apps Collection Set Variable from Specific Value

You want to check if the collection contains either “Laptop” or “Outlook” in the Product Name column, and set a variable called varRecord to “Yes” or “No”.

Step 1: Load the Collection

In the App > OnStart property:

ClearCollect(
Issuecol,
'Issue Tracker'
)

Step 2: Add the Button

Insert a Button and set its OnSelect property to:

Set(
varRecord,
If(
LookUp(
Issuecol,
"Laptop" exactin 'Product Name' || "Outlook" exactin 'Product Name',
true
),
"Yes",
"No"
)
)

Here’s the breakdown:

  • LookUp() searches the collection for the first row that matches your condition
  • The condition uses || (OR) to check for either “Laptop” or “Outlook”
  • If a match is found, it returns true, which causes the If() to return “Yes”
  • If nothing matches, it returns “No”
  • Set() stores that result in the global variable varRecord
Power Apps Collection Set a Variable from Specific Value

You can then use varRecord anywhere in your app — to show a label, enable a button, trigger a patch, and so on.

Power Apps Collection Set Variable from the Specific Value

Good to know: LookUp is more efficient than Filter when you just need to check existence, because it stops as soon as it finds the first match. For large collections, this is slightly faster than filtering everything and counting.

Bonus Tips: More Ways to Work with Power Apps Collections and Contains

Using Power Apps Search() Function for Dynamic Filtering

If you want a live search bar that filters a collection as the user types, the Power Apps Search() function is your best friend. Unlike Filter with inSearch() is designed specifically for text-based searching across multiple columns.

Search(
colProductThings,
txtSearch.Text,
"Title",
"Manufacturer"
)

This searches across both the Title and Manufacturer columns in real-time. Just set this as the Items property of a Gallery or Data Table.

Checking If an Entire Record Exists in a Power Apps Collection

If you want to check whether a complete record (not just one column) already exists in a collection, you can use the in operator on the whole record:

If(
ThisItem in colProductThings,
"Exists",
"Not Found"
)

This works well in galleries where you’re looping through items and want to flag which ones are already saved locally.

Using Power Apps Not with in to Find Missing Values

To find items that are not in a PowerApps collection, combine Not with the in operator:

Filter(
AllProducts,
!(ThisRecord.Title in colProductThings.Title)
)

This returns all products from AllProducts that haven’t been added to colProductThings yet. It’s a handy pattern for building “add items to cart” or “pick from remaining list” type screens.

Conclusion

Power Apps may not have a traditional Contains() function like you’d find in other platforms, but the in and exactin operators fill that gap perfectly — and often with more flexibility. Whether you’re filtering products by manufacturer, preventing duplicate entries, or driving conditional logic with variables, these tools handle it all cleanly.

The key takeaway: use in for case-insensitive matches, exactin for exact matches, Filter + CountRows when you need to check a specific column for duplicates, and LookUp when you just need to know if something exists without retrieving all the results.

Also, you may like some more Power Apps tutorials:

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…