{"id":33983,"date":"2023-02-10T14:42:04","date_gmt":"2023-02-10T09:12:04","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=33983"},"modified":"2024-09-20T16:09:34","modified_gmt":"2024-09-20T10:39:34","slug":"how-to-display-search-and-filter-data-table-in-canvas-app","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2023\/02\/how-to-display-search-and-filter-data-table-in-canvas-app\/","title":{"rendered":"How to Display, Search, and Filter data table in Canvas App"},"content":{"rendered":"<p><strong>The agenda for today\u2019s blog is-<\/strong><br \/>\n1. How to show CRM entity data in tabular format using a data table control of the <a href=\"https:\/\/www.inogic.com\/services\/microsoft-power-platform\/microsoft-power-apps-canvas-app\/\" target=\"_blank\" rel=\"noopener\">Canvas App<\/a>.<br \/>\n2. How to read the selected data table row details.<br \/>\n3. How to filter or search data table data based on some condition.<\/p>\n<p><strong>Requirement:<\/strong><br \/>\nWe have a customer requirement in that the user wants to display the Accounts on the Data Table control. After displaying Accounts on the Data Table, the user wants to search Accounts data based on the Account Name column along with that user wants to read the individual row data, if any user clicks on an individual row then retrieved data should be displayed on a specific form. One more important requirement users have, they need to filter the Accounts which contain Annual Revenue of more than 5000.<\/p>\n<p><strong>Solution:<\/strong><br \/>\nTo achieve the above customer requirement, we have created a Canvas App and tried to implement the above three requirements one by one.<br \/>\n1. Display the Account entity records on the Data Table control<br \/>\nAfter creating the Canvas App, add Data Table control on the current app screen as shown in the screenshot below:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-33991\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/1Canvas-App.jpeg\" alt=\"Canvas App\" width=\"1913\" height=\"901\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/1Canvas-App.jpeg 1913w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/1Canvas-App-300x141.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/1Canvas-App-1024x482.jpeg 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/1Canvas-App-768x362.jpeg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/1Canvas-App-1536x723.jpeg 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/1Canvas-App-660x311.jpeg 660w\" sizes=\"(max-width: 1913px) 100vw, 1913px\" \/><\/p>\n<p>After adding the data table control, we have to set the Data Source property for added Data Table. So, in our scenario, we have selected the Account entity because the user wants to see the Account entity records.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-33990\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/2Canvas-App.jpeg\" alt=\"Canvas App\" width=\"1915\" height=\"881\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/2Canvas-App.jpeg 1915w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/2Canvas-App-300x138.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/2Canvas-App-1024x471.jpeg 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/2Canvas-App-768x353.jpeg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/2Canvas-App-1536x707.jpeg 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/2Canvas-App-660x304.jpeg 660w\" sizes=\"(max-width: 1915px) 100vw, 1915px\" \/><\/p>\n<p>After setting the Account entity as Data Source and running the Canvas App, we have got all Account entity records bound in the data table.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-33989\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/3Canvas-App.jpeg\" alt=\"Canvas App\" width=\"1910\" height=\"878\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/3Canvas-App.jpeg 1910w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/3Canvas-App-300x138.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/3Canvas-App-1024x471.jpeg 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/3Canvas-App-768x353.jpeg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/3Canvas-App-1536x706.jpeg 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/3Canvas-App-660x303.jpeg 660w\" sizes=\"(max-width: 1910px) 100vw, 1910px\" \/><\/p>\n<p>2. How to read the selected data table row details.<br \/>\nTo achieve this, add one Edit Form control on the same screen of the app as shown below screenshot:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-33988\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/4Canvas-App.jpeg\" alt=\"Canvas App\" width=\"1911\" height=\"885\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/4Canvas-App.jpeg 1911w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/4Canvas-App-300x139.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/4Canvas-App-1024x474.jpeg 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/4Canvas-App-768x356.jpeg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/4Canvas-App-1536x711.jpeg 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/4Canvas-App-660x306.jpeg 660w\" sizes=\"(max-width: 1911px) 100vw, 1911px\" \/><\/p>\n<p>After adding Edit Form we have to set the Item and Data Source properties of the form. In our example, we have set the Item as \u201cAccount.Selected\u201d, where Account indicates the Data Table object and Selected indicates the selected row of the current data table. Also, we have set the Data Source property as \u201cAccounts\u201d as we have connected this form to Account Data Table.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-33987\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/5Canvas-App.jpeg\" alt=\"Canvas App\" width=\"1917\" height=\"899\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/5Canvas-App.jpeg 1917w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/5Canvas-App-300x141.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/5Canvas-App-1024x480.jpeg 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/5Canvas-App-768x360.jpeg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/5Canvas-App-1536x720.jpeg 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/5Canvas-App-660x310.jpeg 660w\" sizes=\"(max-width: 1917px) 100vw, 1917px\" \/><\/p>\n<p>After saving the above changes we have again run the canvas app and we got the correct result bind in Edit Form as shown in the screenshot below:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-33986\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/6Canvas-App.jpeg\" alt=\"Canvas App\" width=\"1915\" height=\"893\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/6Canvas-App.jpeg 1915w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/6Canvas-App-300x140.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/6Canvas-App-1024x478.jpeg 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/6Canvas-App-768x358.jpeg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/6Canvas-App-1536x716.jpeg 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/6Canvas-App-660x308.jpeg 660w\" sizes=\"(max-width: 1915px) 100vw, 1915px\" \/><\/p>\n<p>3. How to filter or search data table data based on some condition<br \/>\nTo search data in Data Table we have added a Text Input control on the same screen of the app. After adding the Text Input apply the PowerFx formula to the Accounts data table as follows which helps to show only those accounts which contain the Account Name column.<\/p>\n<p>Search(Accounts,TextInput1.Text,&#8221;name&#8221;)<\/p>\n<p>After setting the above powerFx formula we have run the Canvas App and we got the expected output as shown screenshot below:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-33985\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/7Canvas-App.jpeg\" alt=\"Canvas App\" width=\"1909\" height=\"855\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/7Canvas-App.jpeg 1909w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/7Canvas-App-300x134.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/7Canvas-App-1024x459.jpeg 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/7Canvas-App-768x344.jpeg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/7Canvas-App-1536x688.jpeg 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/7Canvas-App-660x296.jpeg 660w\" sizes=\"(max-width: 1909px) 100vw, 1909px\" \/><\/p>\n<p>In the filter process, the customer wants to display those Accounts which having Annual Revenue of more than 5000. To achieve this requirement, we have set the below powerFx formula to the Data Table and we have got the correct result as shown below screenshot:<br \/>\nFilter(Accounts,&#8217;Annual Revenue&#8217;&gt;=5000)<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-33984\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/8Canvas-App.jpeg\" alt=\"Canvas App\" width=\"1895\" height=\"871\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/8Canvas-App.jpeg 1895w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/8Canvas-App-300x138.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/8Canvas-App-1024x471.jpeg 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/8Canvas-App-768x353.jpeg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/8Canvas-App-1536x706.jpeg 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/8Canvas-App-660x303.jpeg 660w\" sizes=\"(max-width: 1895px) 100vw, 1895px\" \/><\/p>\n<p><strong>Conclusion:<\/strong><\/p>\n<p>Using Data Table control in Canvas App we can display the CRM entity records in table format in Canvas App. Also using the Search and Filter function, we can filter the data based on some conditions.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/services\/microsoft-power-platform\/microsoft-power-apps-canvas-app\/\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"alignnone wp-image-37076 size-full\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/01\/Canvas-App-1.gif\" alt=\"Canvas App\" width=\"800\" height=\"200\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The agenda for today\u2019s blog is- 1. How to show CRM entity data in tabular format using a data table control of the Canvas App. 2. How to read the selected data table row details. 3. How to filter or search data table data based on some condition. Requirement: We have a customer requirement in\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2023\/02\/how-to-display-search-and-filter-data-table-in-canvas-app\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1954],"tags":[1867],"class_list":["post-33983","post","type-post","status-publish","format-standard","hentry","category-canvas-apps","tag-canvas-app"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/33983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=33983"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/33983\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=33983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=33983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=33983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}