SharePoint [Me] Filter in PowerApps

SharePoint has a couple of built-in filters for column values: [Today] and [Me]. These allow users to filter views by dynamic data. For example you can create a view called AssignedToMe and set a filter like so:

image

Using this approach site admins don’t need to create views specific to each user, but can use the [Me] filter on a single view that applies to each individual user. As a user visits the view, they see only the records that are specific to them.

How does one do this in PowerApps when filtering data? Good question. This came up during our Minnesota SharePoint User Group (MNSPUG) meeting today and good old Brian Caauwe knew the answer: rather than using [Me] we use the User function in PowerApps.

On a gallery or data table object, our Items property might have a formula something like this:

Items = Filter(‘IT Request’, AssignedTo.DisplayName=User().FullName)

Note: When bringing fields over from SharePoint, PowerApps translates the CreatedBy and ModifiedBy fields to something a little different. That might be a little confusing when getting started.

  • CreatedBy –> Author
  • ModifiedBy –> Editor

Good questions from the attendees today and good catch by Brian with the User() answer. Smile 

References

2 comments

  1. I think, this doesn’t works anymore. DO you have any idea about it. Currently in Filter, if we add ‘.’ to get it’s property, it gives error message.

Leave a Reply to plural Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.