In this Power Apps tutorial, I will explain everything related to the Power Apps Collection Contains.
First, we will see what the Power Apps Collection Contains. Then, we will discuss whether the Power Apps collection contains a specific value.
Additionally, we will learn the Power Apps check if the value exists in the collection and Power Apps collection set variable from a specific value.
Power Apps Collection Contains
- Microsoft provides many functions and operators in Power Apps to manage the data. Unfortunately, some functions may be missing from the Power Apps Canvas app, like Contains() function.
- We can use the Contains () function to filter the Power Apps collection based on the specific word or text. You can also use the in and exactin operators to serve the same purpose as a Contains() function.
Power Apps Collection Contains Specific Value
Here, we will see how to work with Power Apps Collection Contains Specific Value.
Example:
I have a SharePoint Online list, i.e., [Product Details], and inside this, I have added columns with various data types.
Refer to the below table:
Column Name | Data Type |
Title | It is a default single line of text |
Manufacturer | Choice column |
Price | Currency column |
PurchaseDate | Date and time column |

- Power Apps has a Data table control [1st image] with some records [retrieved from SharePoint list], as shown below.
- In the data table, there is a column called Manufacturer. I want to filter this column based on all the Samsung values.
- When a user clicks on the button [Collect filter data], the 1st data table will filter, and all the filtered results will appear in the 2nd below data table control.

To achieve the above example, follow the below-mentioned steps. Such as:
- Open Power Apps with valid Microsoft 365 credentials -> Create a Canvas app.
- Then, select the App (from the left navigation) -> Choose the OnStart and set its property code like below.
OnStart = ClearCollect(
colProductThings,
'Product Details'
)
Where,
- colProductThings = Collection Name
- ‘Product Details’ = SharePoint Online List

- Then, select a screen -> Insert a Data table, and set its Items property as:
Items = colProductThings
- To display the collection fields in the data table control, click the Edit fields option and add fields as needed.

- Now, we need to display the records based on the specific value. To do so, insert a Button control and set its OnSelect property code below.
OnSelect = ClearCollect(
Productscol,
Filter(
'Product Details',
"Samsung" exactin Manufacturer.Value
)
)
Where,
- Productcol = Collection Name
- Filter() = This function to find a set of records that matches one or more criteria
- ‘Product Details’ = SharePoint Online List
- “Samsung” = It is the name of the column that we want to filter

- Then, insert another Data table and set its Items property as:
Items = Productcol
- To display the collection fields in the data table control, click on the Edit fields option and add fields as needed.
- Now, click on the button control [Collect filter data] to display the Power Apps collection with only specific records, as shown below.

This is how to filter a Power Apps collection containing a specific value.
Power Apps Check If Value Exists in Collection
Now we will see how to work with Power Apps Check If Value Exists in Collection.
Example:
- I have a Power Apps collection, i.e., [colEmployeeEmail] with one column (Enter User Email).

- I have added a text input, button control, and data table on the Power Apps screen. When a new user comes and enters a user email address, it will be added to the data table.
- If it is an existing value then, it will not take and it will give a notification message, i.e., [This User Email…] as shown below.

To work around the above example, follow the below steps.
- On the Power Apps Canvas app screen -> Insert a Text label [Enter User Email] -> Add a Text input to enter a user email address -> Insert a Button control and set its OnSelect property as:
OnSelect = If(
CountRows(
Filter(
colEmployeeEmail,
'Enter User Email' = txt_Email.Text
)
) > 0,
Notify(
"This User Email Address Already Exists, Please Enter New Email Address",
NotificationType.Information
),
Collect(
colEmployeeEmail,
{'Enter User Email': txt_Email.Text}
)
)
Where,
- If() = This function can help us to evaluate multiple unrelated conditions
- CountRows() = This function counts the number of records in a table
- colEmployeeEmail = Collection Name
- ‘Enter User Email’ = Column Name
- txt_Email.Text = Text input name
- Notify() = This function displays a notification message to the user at the top of the screen
- “This User Email Address Already Exists, Please Enter New Email Address” = Notification message

- Then, insert a Data table and set its Items property as:
Items = colEmployeeEmail
- To display the collection fields in the data table control, click the Edit fields option and add fields as needed.

- Then, enter a user email address and click the button control [Submit]. Once you add different user emails, that will be added to the data table, as shown below.

- Once you enter the existing column value, it will not take and you will get a notification message, i.e., [This User Email…] like below.

This is all about the Power Apps check if value exists in the collection.
Power Apps Collection Set Variable from Specific Value
Let us discuss working with Power Apps Collection Set Variable from Specific Value.
Example:
- Suppose I have a Power Apps collection, i.e., [Issuecol]. In this collection, I have added two columns:
- Product Issue
- Product Name
Refer to the below table:
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 |

- Now, I want to check if the Power Apps collection contains a specific value, i.e., [Laptop or Outlook], and set the variable value as “Yes” as shown below.

To do so, follow the below steps. Such as:
- On the Power Apps Screen -> Select the App (from the left navigation) -> Choose the OnStart and set its property code like below.
OnStart = ClearCollect(
Issuecol,
'Issue Tracker'
)
Where,
- Issuecol = Collection Name
- ‘Issue Tracker’ = SharePoint Online List
- Then, insert a Data table and set its Items property as:
Items = Issuecol
- To display the collection fields in the data table control, click the Edit fields option and add fields as needed.

- Now, click on the Run OnStart icon under the App section to display the collection on a data table as shown below.

- Next, insert a Button control and set its OnSelect property code like below.
OnSelect = Set(
varRecord,
If(
LookUp(
Issuecol,
"Laptop" exactin 'Product Name' || "Outlook" exactin 'Product Name',
true
),
"Yes",
"No"
)
)
Where,
- Set() = This function works with global variables that are available in the entire app
- varRecord = Global Variable Name
- Issuecol = Collection Name
- “Laptop”, “Outlook” = Collection Columns
- “Yes” = true_value
- “No” = else_value

- Once, you click on the button control, you will get a variable value as “Yes” as shown below.

This is all about the Power Apps collection set variable from a specific value.
Conclusion
Whenever you want to create a Power Apps collection containing a specific value, you can use [in] or [exactin]operators to display the specific records on a Power Apps collection.
Here, from this Power Apps tutorial, I have explained the Power Apps collection containing a specific value. Then, we discussed Power Apps check if a value exists in the collection.
Finally, we covered the Power Apps collection set variable from a specific value.
Also, you may like some more Power Apps tutorials:
- How to Bind Power Apps Dropdown Items From Collection
- Display Multiple Columns in Power Apps Dropdown
- Create Power Apps Collection from Multiple SharePoint Lists
- Sort Power Apps Collection Alphabetically
- Remove Items from a Power Apps Collection
- Validate Power Apps Dropdown Control

Preeti Sahu is an expert in Power Apps and has more than 6 years of experience working with SharePoint and the Power Platform. As a Power Platform expert for Power BI, Power Apps, Power Automate, Power Virtual Agents, and Power Pages, she is currently employed with TSinfo Technologies. She is the author of the book Microsoft Power Platform A Deep Dive. She also made a big technical contribution to SharePointDotNet.com in the form of articles on the Power Platform. She enjoys traveling and spending time with her family in her spare time.