Blog
SharePoint - Filtering lists by User() is now delegable
A common requirement is to filter SharePoint records by the email address of the current user. In the past, this task could be difficult because filtering lists by User().Email was not delegable. The good news is that Microsoft has now improved this behaviour and is post describes what's new.
The problem that used to exist
The screenshot below illustrates the problem that used to exist. Taking the example of a SharePoint list of property records, if we were to filter the records that were created by the currently logged on
user, the formula beneath would result in a delegation warning:
Filter(Property,
'Created By'.Email = User().Email
)
There are more details in my post here, including the workarounds that were previously necessary.
http://powerappsguide.com/blog/post/sharepoint-how-to-filter-records-by-the-current-user
The new improved behaviour
The great news is that following an update to Power Apps, if we were to attempt to use the same formula today, the expression is now delegable and does not result in any warnings (shown in the screenshot below). To confirm this behaviour, I reduced the 'Data row limit' setting and was able to confirm that the filter expression returned all the expected records in a delegable way.
Conclusion
- Categories:
- sharepoint
- SharePoint - Deleting the last record from a SharePoint list - how NOT to do this!
- Walkthrough - An beginners guide to building an app that stores images in SharePoint
- SharePoint - What to do when there's a mismatch between times in Power Apps and SharePoint
- SharePoint - How to fix the "skip to main content" error message on integrated forms, or to fix forms where records don't save
- SharePoint - Use this trick to perform a 'contains' type search in a more delegable way
- Sharepoint - Filtering records by yes/no columns bug - now fixed!
- Configuration - How to set the SharePoint address of a data source with a variable
- Data - How to make a copy of a record
- SharePoint - How to export and import lists and maintain lookup relationships
- SharePoint - how to fix list threshold errors when working with very large lists
- Data - How to move SharePoint sites, lists, and data
- Code - Can we hack SharePoint ID columns to be delegable using the greater than/less than operators?
- SharePoint - How to filter records by the current user
- SharePoint - Beware of numeric calculated columns!