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