{"id":758,"date":"2016-08-03T10:32:07","date_gmt":"2016-08-03T16:32:07","guid":{"rendered":"http:\/\/www.idubbs.com\/blog\/?p=758"},"modified":"2016-08-03T10:32:07","modified_gmt":"2016-08-03T16:32:07","slug":"powerapps-and-sharepoint-filtering-the-list-view","status":"publish","type":"post","link":"https:\/\/www.idubbs.com\/blog\/2016\/powerapps-and-sharepoint-filtering-the-list-view\/","title":{"rendered":"PowerApps and SharePoint &ndash; Filtering the List View"},"content":{"rendered":"<p><font color=\"#ff0000\">*Disclaimer* \u2013 This post based on Preview version of PowerApps. I\u2019ll make every effort to update with any changes and verify when PowerApps is released.<\/font>&nbsp;<\/p>\n<p>One of the powerful features in PowerApps for SharePoint users is the ability to create an app from a SharePoint list. When using this feature, PowerApps creates three screens for us to start with: A Browse screen, a View screen, and a New\/Edit Item screen.&nbsp;&nbsp; <\/p>\n<p>The Browse screen contains a Gallery control \u2013 which displays the contents of a list. By default it shows ALL items in a list. This might be fine for some business needs \u2013 especially with the inclusion of the search functionality also built into the default screen. Some use cases however may look for a filtered view of a list.&nbsp; <\/p>\n<h2>The Short Version<\/h2>\n<p>The browse screen is set up to show all items, as well as take input from the search box. I\u2019m going to change the list to display all items where the Request Type is a certain value. <\/p>\n<ol>\n<li>Select the Gallery on the browse page&nbsp; <br \/><a href=\"http:\/\/www.idubbs.com\/blog\/wp-content\/uploads\/2016\/07\/image-9.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"http:\/\/www.idubbs.com\/blog\/wp-content\/uploads\/2016\/07\/image_thumb-9.png\" width=\"169\" height=\"281\"><\/a>\n<li>Change the <em>Items<\/em> formula from search-based to filter-based: <br \/>From: <br \/><a href=\"http:\/\/www.idubbs.com\/blog\/wp-content\/uploads\/2016\/07\/image-10.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"http:\/\/www.idubbs.com\/blog\/wp-content\/uploads\/2016\/07\/image_thumb-10.png\" width=\"580\" height=\"28\"><\/a><br \/>SortByColumns(Search(&#8216;<strong>Service Requests<\/strong>&#8216;, TextSearchBox1_1.Text, &#8220;Comments&#8221;, &#8220;Notes&#8221;, &#8220;Title&#8221;, &#8220;Title&#8221;), &#8220;Comments&#8221;, If(SortDescending1, Descending, Ascending))<br \/>To: <br \/>SortByColumns(<strong>Filter(\u2018Service Requests\u2019, ReqType.Value=\u201dPEBKaC\u201d)<\/strong>, &#8220;Comments&#8221;, If(SortDescending1, Descending, Ascending))\n<li>Items displayed on the screen should now be filtered by the Request Type. <\/li>\n<\/ol>\n<h2>Notes <\/h2>\n<ul>\n<li>Similar to other methods in SharePoint (like CSR with JSLink) the field names seem to be using the <a href=\"http:\/\/www.idubbs.com\/blog\/2012\/finding-internal-names-for-sharepoint-list-columns\/\" target=\"_blank\">internal name<\/a> of the field. Above, when accessing the Request Type we needed to use \u2018ReqType\u2019. <\/li>\n<\/ul>\n<h2>References<\/h2>\n<ul>\n<li><a href=\"https:\/\/powerapps.microsoft.com\/en-us\/tutorials\/working-with-forms\/\" target=\"_blank\">Understand data forms<\/a>\n<li><a href=\"https:\/\/powerapps.microsoft.com\/en-us\/tutorials\/control-gallery\/\" target=\"_blank\">Gallery control in PowerApps<\/a>\n<li><a href=\"https:\/\/powerapps.microsoft.com\/en-us\/tutorials\/function-filter-lookup\/\" target=\"_blank\">Filter, Search, and LookUp functions in PowerApps<\/a>\n<li><a href=\"https:\/\/powerapps.microsoft.com\/en-us\/tutorials\/function-sort\/\" target=\"_blank\">Sort and SortByColumns functions in PowerApps<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>*Disclaimer* \u2013 This post based on Preview version of PowerApps. I\u2019ll make every effort to update with any changes and verify when PowerApps is released.&nbsp; One of the powerful features [&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":[10,96,99,21],"tags":[101],"class_list":["post-758","post","type-post","status-publish","format-standard","hentry","category-office365","category-powerapps","category-preview","category-sharepoint-online","tag-filter"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pgWQ1-ce","jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/posts\/758","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=758"}],"version-history":[{"count":1,"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/posts\/758\/revisions"}],"predecessor-version":[{"id":759,"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/posts\/758\/revisions\/759"}],"wp:attachment":[{"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/media?parent=758"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/categories?post=758"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/tags?post=758"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}