{"id":34168,"date":"2023-03-06T14:58:26","date_gmt":"2023-03-06T09:28:26","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=34168"},"modified":"2023-03-06T15:34:03","modified_gmt":"2023-03-06T10:04:03","slug":"how-to-use-facets-filters-and-more-optional-parameters-of-dataverse-search-in-power-automate-flow","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2023\/03\/how-to-use-facets-filters-and-more-optional-parameters-of-dataverse-search-in-power-automate-flow\/","title":{"rendered":"How to use facets, filters, and more optional parameters of Dataverse Search in Power Automate Flow?"},"content":{"rendered":"<p>In our <a href=\"https:\/\/www.inogic.com\/blog\/2023\/02\/how-to-use-optional-parameters-of-dataverse-search-in-power-automate-flow\/\" target=\"_blank\" rel=\"noopener\">previous blog<\/a>, we saw how to use some optional parameters. This blog will be a continuation of the same. In this blog, we will look at other optional parameters to limit the search per our requirements. So, without further ado, let\u2019s get started.<\/p>\n<p>Now, first, for the additional parameter, we will look at facets.<\/p>\n<p><strong><em>facets<\/em><\/strong> \u2013 With this optional parameter, we can further drill down into the search results based on the information that we want. So, continuing with the same example, after searching for Jim, we need to quickly see how many records are there in our CRM according to the entity type. Here, I want to drill down using the entity name for which the syntax would be &#8211; \u201c@search.entityname\u201d. Since the body of the HTTP request cannot directly use \u2018@,\u2019 we have to use a workaround here. We will use the concat() function of Power Automate and the resultant syntax would be as below \u2013<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-34167\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/1Power-Automate-Flow.jpeg\" alt=\"Power Automate Flow\" width=\"869\" height=\"848\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/1Power-Automate-Flow.jpeg 770w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/1Power-Automate-Flow-300x293.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/1Power-Automate-Flow-768x749.jpeg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/1Power-Automate-Flow-660x644.jpeg 660w\" sizes=\"(max-width: 869px) 100vw, 869px\" \/><\/p>\n<p><strong><em>filter<\/em><\/strong> \u2013 This is another optional parameter that is used to filter out the records. Unlike facets, a filter will be applied with the query and the results will be based on the criteria defined in the filter query. If multiple types of entity records are returned, the filter should contain separate filters for every entity. In the below example, I\u2019m filtering the contacts that have city Detroit &amp; accounts that have city, Brooklyn. The syntax is as below \u2013<\/p>\n<p><img decoding=\"async\" class=\"alignnone  wp-image-34166\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/2Power-Automate-Flow.jpeg\" alt=\"Power Automate Flow\" width=\"889\" height=\"942\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/2Power-Automate-Flow.jpeg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/2Power-Automate-Flow-283x300.jpeg 283w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/2Power-Automate-Flow-660x700.jpeg 660w\" sizes=\"(max-width: 889px) 100vw, 889px\" \/><\/p>\n<p><strong><em>searchmode<\/em><\/strong> \u2013 This is another optional parameter that can have a value of either any or all. Any will return the values matching any of the conditions in the search query while all will return all records which match both the search query parameters. \u201cJim -Harper\u201d will return all the records that either contain Jim or don\u2019t contain Harper with searchmode \u2018any\u2019, while searchmode \u2018all\u2019 will return the records that contain Jim and don\u2019t contain Harper. The syntax is as below \u2013<\/p>\n<p><img decoding=\"async\" class=\"alignnone  wp-image-34165\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/3Power-Automate-Flow.jpeg\" alt=\"Power Automate Flow\" width=\"916\" height=\"822\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/3Power-Automate-Flow.jpeg 767w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/3Power-Automate-Flow-300x269.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/3Power-Automate-Flow-660x592.jpeg 660w\" sizes=\"(max-width: 916px) 100vw, 916px\" \/><\/p>\n<p><strong><em>searchtype<\/em><\/strong> \u2013 This is another optional parameter that can have a value of either simple or full. \u2018Simple\u2019 only has a few functionalities supported while \u2018full\u2019 supports the functionalities of Lucene query syntax. The syntax is as below \u2013<\/p>\n<p><img decoding=\"async\" class=\"alignnone  wp-image-34164\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/4Power-Automate-Flow.jpeg\" alt=\"Power Automate Flow\" width=\"1008\" height=\"893\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/4Power-Automate-Flow.jpeg 762w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/4Power-Automate-Flow-300x266.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/4Power-Automate-Flow-660x585.jpeg 660w\" sizes=\"(max-width: 1008px) 100vw, 1008px\" \/><\/p>\n<p><img decoding=\"async\" class=\"alignnone  wp-image-34163\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/5Power-Automate-Flow.jpeg\" alt=\"Power Automate Flow\" width=\"876\" height=\"820\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/5Power-Automate-Flow.jpeg 774w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/5Power-Automate-Flow-300x281.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/5Power-Automate-Flow-768x718.jpeg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/5Power-Automate-Flow-660x617.jpeg 660w\" sizes=\"(max-width: 876px) 100vw, 876px\" \/><\/p>\n<p>The differences between simple &amp; full searchtypes are as follows:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-34169\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/6Power-Automate-Flow.png\" alt=\"\" width=\"609\" height=\"225\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/6Power-Automate-Flow.png 609w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/03\/6Power-Automate-Flow-300x111.png 300w\" sizes=\"(max-width: 609px) 100vw, 609px\" \/><\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>This is how we can use optional parameters to limit the search as per our requirements.<\/p>\n<p><a href=\"http:\/\/inogic.com\/services\/\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"alignnone  wp-image-34038\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/Microsoft-Power-Platform-3-1.png\" alt=\"Microsoft Power Platform (3)\" width=\"836\" height=\"209\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/Microsoft-Power-Platform-3-1.png 800w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/Microsoft-Power-Platform-3-1-300x75.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/Microsoft-Power-Platform-3-1-768x192.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/Microsoft-Power-Platform-3-1-660x165.png 660w\" sizes=\"(max-width: 836px) 100vw, 836px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our previous blog, we saw how to use some optional parameters. This blog will be a continuation of the same. In this blog, we will look at other optional parameters to limit the search per our requirements. So, without further ado, let\u2019s get started. Now, first, for the additional parameter, we will look at\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2023\/03\/how-to-use-facets-filters-and-more-optional-parameters-of-dataverse-search-in-power-automate-flow\/\">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":[38],"tags":[],"class_list":["post-34168","post","type-post","status-publish","format-standard","hentry","category-microsoft-powerapps"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/34168","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=34168"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/34168\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=34168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=34168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=34168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}