Filter SharePoint Items by Current User in Power Apps
Question details
The user wants to switch between all SharePoint list items and items created by the current user without losing the existing search.

- Product
- Microsoft Power Apps and SharePoint
- Device & OS
- not provided
- Scenario
- A Power Apps app searches a SharePoint list and needs a button to toggle a current-user filter.
- Observed behavior
- The desired result is a searchable list that can show either all matching items or only matching items created by the current user.
In Power Apps Studio, identify the gallery's existing Items formula, the search box name, and the SharePoint creator column. The example uses the standard Created By person field and compares its email address with the signed-in user's email.
Add a Current-User Toggle to the Gallery Filter
Use a variable to switch the creator condition on or off while keeping the search condition in the gallery's Items formula.
Select the screen in Power Apps Studio and add Set(FilterMyInteractions, false) to its OnVisible property. If OnVisible already has actions, append it using a semicolon.
Select the button and set its OnSelect property to Set(FilterMyInteractions, !FilterMyInteractions). Each click switches between all items and the current user's items.
Select the gallery and update its Items property. For example: SortByColumns(Filter('My Table', TextSearchBox1.Text in Title && (!FilterMyInteractions || 'Created By'.Email = User().Email)), "Title", SortOrder.Ascending). Replace the list, search box, and sort column names with those in your app. If your existing search or sort formula differs, retain it and add the conditional creator check to its filter.
Select Preview, enter a search term, and click the button to verify that both views retain the search and that the filtered view shows only items created by the signed-in user.

Use WPS Office for SharePoint List Exports
WPS Office is a free, lightweight alternative for working with exported documents and spreadsheets. Its familiar interface and Microsoft Office format support make it easy to move existing files, although it does not replace Power Apps or fix its formulas.

Frequently Asked Questions
Why compare the creator's email instead of their full name?
Names can be duplicated or formatted differently. For a SharePoint Created By person field, compare 'Created By'.Email with User().Email in the gallery's Items formula, provided those email values match in your environment.
How can I show whether the filter is active?
Set the button's Text property to If(FilterMyInteractions, "Show all items", "Show my items"). The label then describes what the next click will do.
Will the search still work when the user filter is off?
Yes. In the example, TextSearchBox1.Text in Title remains a required condition in both views. Turning the variable off only bypasses the creator condition.
Why are some items missing from a large SharePoint list?
A nondelegable formula may evaluate only a limited set of records locally. Check the gallery's Items formula for delegation warnings in Power Apps Studio and revise the query or data design if needed.




