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.
A 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.
| Operator | Case Sensitive? | Example |
|---|---|---|
in | No | "samsung" in Manufacturer.Value → matches “Samsung”, “SAMSUNG” |
exactin | Yes | "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 Name | Data Type |
|---|---|
| Title | Single line of text (default) |
| Manufacturer | Choice column |
| Price | Currency column |
| PurchaseDate | Date and time column |

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

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'
)

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.

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
Productscoland 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

Step 4: Show the Filtered Results
Insert a second Data Table and set its Items property to:
Items = Productscol

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
exactinforin. 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.

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:
- Filter() looks through the collection for any row where the email matches what the user typed
- CountRows() counts how many matching rows were found
- If the count is greater than 0, the email already exists — so a Notify message pops up at the top of the screen
- If the count is 0, the email is new — so Collect adds it to the collection

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.

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. UsingFilter+CountRowsgives 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 Issue | Product Name |
|---|---|
| Laptop is not working | Laptop |
| Outlook issue | Outlook |
| Mobile remote issue | Mobile |
| Laptop mouse is not working | Laptop |
| Repair Outlook Profile | Outlook |

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

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

Good to know:
LookUpis more efficient thanFilterwhen 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 in, Search() 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:
- Power Apps Display Mode
- Concurrent Function in Power Apps
- Set a Button to Disabled in Power Apps
- Populate Distinct Values in Power Apps Combo Box
- Remove Last, LastN, First, and FirstN Characters From a String in Power Apps

Preeti Sahu is an expert in Power Apps and has over six years of experience working with SharePoint Online and the Power Platform. She is the co-author of Microsoft Power Platform: A Deep Dive book. As a Power Platform developer, she has worked on developing various tools using Power Apps and Power Automate. She also makes Microsoft 365 videos and shares them on YouTube.