{"id":1021,"date":"2017-11-08T16:29:57","date_gmt":"2017-11-08T22:29:57","guid":{"rendered":"http:\/\/www.idubbs.com\/blog\/?p=1021"},"modified":"2017-11-08T16:29:57","modified_gmt":"2017-11-08T22:29:57","slug":"sharepoint-me-filter-in-powerapps","status":"publish","type":"post","link":"https:\/\/www.idubbs.com\/blog\/2017\/sharepoint-me-filter-in-powerapps\/","title":{"rendered":"SharePoint [Me] Filter in PowerApps"},"content":{"rendered":"<p>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: <\/p>\n<p><a href=\"http:\/\/www.idubbs.com\/blog\/wp-content\/uploads\/2017\/11\/image.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"http:\/\/www.idubbs.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb.png\" width=\"554\" height=\"184\"><\/a><\/p>\n<p>Using this approach site admins don\u2019t 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. <\/p>\n<p>How does one do this in PowerApps when filtering data? Good question. This came up during our Minnesota SharePoint User Group (<a href=\"http:\/\/www.sharepointmn.com\" target=\"_blank\">MNSPUG<\/a>) meeting today and good old Brian Caauwe knew the answer: rather than using [Me] we use the <strong>User function<\/strong> in PowerApps. <\/p>\n<p>On a gallery or data table object, our Items property might have a formula something like this: <\/p>\n<p>Items = Filter(&#8216;IT Request&#8217;, AssignedTo.DisplayName=<strong>User().FullName<\/strong>) <\/p>\n<p>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. <\/p>\n<ul>\n<li>CreatedBy \u2013&gt; Author<\/li>\n<li>ModifiedBy \u2013&gt; Editor<\/li>\n<\/ul>\n<p>Good questions from the attendees today and good catch by Brian with the User() answer. <img decoding=\"async\" class=\"wlEmoticon wlEmoticon-smile\" style=\"border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none\" alt=\"Smile\" src=\"http:\/\/www.idubbs.com\/blog\/wp-content\/uploads\/2017\/11\/wlEmoticon-smile.png\">&nbsp;<\/p>\n<h3>References<\/h3>\n<ul>\n<li><a href=\"https:\/\/powerapps.microsoft.com\/en-us\/tutorials\/function-user\/\" target=\"_blank\">User function in PowerApps<\/a><\/li>\n<li><a href=\"https:\/\/powerapps.microsoft.com\/en-us\/tutorials\/function-now-today-istoday\/\" target=\"_blank\">Today functions<\/a> <\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[36,10,96,11,21],"tags":[101,142,140,141],"class_list":["post-1021","post","type-post","status-publish","format-standard","hentry","category-mnspug","category-office365","category-powerapps","category-sharepoint","category-sharepoint-online","tag-filter","tag-formulas","tag-me","tag-user"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pgWQ1-gt","jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/posts\/1021","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/comments?post=1021"}],"version-history":[{"count":1,"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/posts\/1021\/revisions"}],"predecessor-version":[{"id":1022,"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/posts\/1021\/revisions\/1022"}],"wp:attachment":[{"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/media?parent=1021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/categories?post=1021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/tags?post=1021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}