{"id":33922,"date":"2023-02-02T11:11:06","date_gmt":"2023-02-02T05:41:06","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=33922"},"modified":"2023-02-02T11:11:06","modified_gmt":"2023-02-02T05:41:06","slug":"how-to-use-optional-parameters-of-dataverse-search-in-power-automate-flow","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2023\/02\/how-to-use-optional-parameters-of-dataverse-search-in-power-automate-flow\/","title":{"rendered":"How to use optional parameters of Dataverse Search in Power Automate Flow?"},"content":{"rendered":"<p>As demonstrated in our previous <a href=\"https:\/\/www.inogic.com\/blog\/2021\/01\/use-relevance-search-api-in-power-automate-canvas-app-part-1\/\" target=\"_blank\" rel=\"noopener\">blog<\/a>, we can use the Dataverse search in Power Automate Flow comfortably. In this blog, we will have a look at how the optional parameters are used to limit the search as per our requirements. So, let\u2019s dive in without further ado.<\/p>\n<p>To quickly revise everything that we have discussed in the previous blog, below is an example to use the search API to find all the entities which have \u201cJim\u201d somewhere in their indexed fields.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-33923\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/1Power-Automate-Flow-1.jpeg\" alt=\"Power Automate Flow\" width=\"631\" height=\"538\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/1Power-Automate-Flow-1.jpeg 631w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/1Power-Automate-Flow-1-300x256.jpeg 300w\" sizes=\"(max-width: 631px) 100vw, 631px\" \/><\/p>\n<p>Now, the successful response will consist mainly of three things \u2013<\/p>\n<ul>\n<li>Value\n<ul>\n<li>An array of all the matching records. By default, 50 rows are returned but can be changed from 1 to 100 using the <em>Top<\/em><\/li>\n<\/ul>\n<\/li>\n<li>Total Record Count\n<ul>\n<li>Returns the total number of matching records if the parameter is set to true. By default, will always be false and return -1.<\/li>\n<\/ul>\n<\/li>\n<li>Facets\n<ul>\n<li>The results of the facet parameter i.e. additional filtering on the received search results.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>It will look like this \u2013<\/p>\n<pre class=\"lang:css gutter:true start:1\">{\r\n\r\n\"querycontext\":\u00a0null,\r\n\r\n\"value\":\u00a0[\r\n\r\n{\r\n\r\n\"@search.score\":\u00a08.406683,\r\n\r\n\"@search.highlights\":\u00a0{\r\n\r\n\"firstname\":\u00a0[\r\n\r\n\"{crmhit}Jim{\/crmhit}\"\r\n\r\n],\r\n\r\n\"fullname\":\u00a0[\r\n\r\n\"{crmhit}Jim{\/crmhit}\u00a0Harper\"\r\n\r\n]\r\n\r\n},\r\n\r\n\"@search.entityname\":\u00a0\"contact\",\r\n\r\n\"@search.objectid\":\u00a0\"c8dbc8c3-0c9a-ed11-aad0-002248cc94a7\",\r\n\r\n\"@search.objecttypecode\":\u00a02,\r\n\r\n\"fullname\":\u00a0\"Jim\u00a0Harper\",\r\n\r\n\"versionnumber\":\u00a01279956,\r\n\r\n\"statecode\":\u00a0[\r\n\r\n\"Active\"\r\n\r\n],\r\n\r\n\"statuscode\":\u00a0[\r\n\r\n\"Active\"\r\n\r\n],\r\n\r\n\"entityimage_url\":\u00a0null,\r\n\r\n\"createdon\":\u00a0\"1\/22\/2023\u00a04:25\u00a0AM\",\r\n\r\n\"modifiedon\":\u00a0\"1\/22\/2023\u00a04:25\u00a0AM\",\r\n\r\n\"emailaddress1\":\u00a0\"JimOHarper@dayrep.com\",\r\n\r\n\"address1_city\":\u00a0\"Detroit\",\r\n\r\n\"address1_telephone1\":\u00a0null,\r\n\r\n\"parentcustomerid\":\u00a0null,\r\n\r\n\"parentcustomeridname\":\u00a0null,\r\n\r\n\"telephone1\":\u00a0\"313-461-8718\"\r\n\r\n},\r\n\r\n{\r\n\r\n\"@search.score\":\u00a07.212613,\r\n\r\n\"@search.highlights\":\u00a0{\r\n\r\n\"firstname\":\u00a0[\r\n\r\n\"{crmhit}Jim{\/crmhit}\"\r\n\r\n],\r\n\r\n\"fullname\":\u00a0[\r\n\r\n\"{crmhit}Jim{\/crmhit}\u00a0Glynn\u00a0(sample)\"\r\n\r\n]\r\n\r\n},\r\n\r\n\"@search.entityname\":\u00a0\"contact\",\r\n\r\n\"@search.objectid\":\u00a0\"f3baf772-9192-ed11-aacf-6045bd44fb6c\",\r\n\r\n\"@search.objecttypecode\":\u00a02,\r\n\r\n\"fullname\":\u00a0\"Jim\u00a0Glynn\u00a0(sample)\",\r\n\r\n\"versionnumber\":\u00a01075816,\r\n\r\n\"statecode\":\u00a0[\r\n\r\n\"Active\"\r\n\r\n],\r\n\r\n\"statuscode\":\u00a0[\r\n\r\n\"Active\"\r\n\r\n],\r\n\r\n\"entityimage_url\":\u00a0\"\/Image\/download.aspx?Entity=contact&amp;Attribute=entityimage&amp;Id=f3baf772-9192-ed11-aacf-6045bd44fb6c&amp;Timestamp=638091357298094244\",\r\n\r\n\"createdon\":\u00a0\"1\/12\/2023\u00a03:55\u00a0PM\",\r\n\r\n\"modifiedon\":\u00a0\"1\/12\/2023\u00a03:55\u00a0PM\",\r\n\r\n\"emailaddress1\":\u00a0\"someone_j@example.com\",\r\n\r\n\"address1_city\":\u00a0\"Renton\",\r\n\r\n\"address1_telephone1\":\u00a0null,\r\n\r\n\"parentcustomerid\":\u00a0\"dfbaf772-9192-ed11-aacf-6045bd44fb6c\",\r\n\r\n\"parentcustomeridname\":\u00a0\"Coho\u00a0Winery\u00a0(sample)\",\r\n\r\n\"@search.parentcustomerid.logicalname\":\u00a0\"account\",\r\n\r\n\"telephone1\":\u00a0\"555-0109\"\r\n\r\n},\r\n\r\n{\r\n\r\n\"@search.score\":\u00a05.5241776,\r\n\r\n\"@search.highlights\":\u00a0{\r\n\r\n\"name\":\u00a0[\r\n\r\n\"{crmhit}Jim's{\/crmhit}\u00a0Accounting\"\r\n\r\n]\r\n\r\n},\r\n\r\n\"@search.entityname\":\u00a0\"account\",\r\n\r\n\"@search.objectid\":\u00a0\"9014d333-0e9a-ed11-aad0-002248cc94a7\",\r\n\r\n\"@search.objecttypecode\":\u00a01,\r\n\r\n\"name\":\u00a0\"Jim's\u00a0Accounting\",\r\n\r\n\"versionnumber\":\u00a01280040,\r\n\r\n\"statecode\":\u00a0[\r\n\r\n\"Active\"\r\n\r\n],\r\n\r\n\"statuscode\":\u00a0[\r\n\r\n\"Active\"\r\n\r\n],\r\n\r\n\"entityimage_url\":\u00a0null,\r\n\r\n\"createdon\":\u00a0\"1\/22\/2023\u00a04:35\u00a0AM\",\r\n\r\n\"modifiedon\":\u00a0\"1\/22\/2023\u00a04:35\u00a0AM\",\r\n\r\n\"emailaddress1\":\u00a0null,\r\n\r\n\"address1_city\":\u00a0null,\r\n\r\n\"accountnumber\":\u00a0null,\r\n\r\n\"primarycontactid\":\u00a0null,\r\n\r\n\"primarycontactidname\":\u00a0null,\r\n\r\n\"telephone1\":\u00a0null\r\n\r\n}\r\n\r\n],\r\n\r\n\"facets\":\u00a0{},\r\n\r\n\"totalrecordcount\":\u00a0-1\r\n\r\n}<\/pre>\n<p>There are some additional optional parameters as well which you can use \u2013<\/p>\n<p><strong><em>entities<\/em><\/strong> \u2013 This is an optional parameter to restrict the search results to a limited number of entities instead of searching through all the entities which have Dataverse search configured. The logical names of the entities must be provided. The syntax is as follows \u2013<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-33929\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/2Power-Automate-Flow-1.jpeg\" alt=\"Power-Automate-Flow\" width=\"629\" height=\"558\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/2Power-Automate-Flow-1.jpeg 629w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/2Power-Automate-Flow-1-300x266.jpeg 300w\" sizes=\"(max-width: 629px) 100vw, 629px\" \/><\/p>\n<p><strong><em>returntotalrecordcount<\/em><\/strong> \u2013 This is an optional parameter of type Boolean. If set to true, will return the total count of search results. By default, it is set to false and will return -1. The syntax is as below \u2013<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-33928\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/3Power-Automate-Flow-1.jpeg\" alt=\"Power Automate Flow\" width=\"623\" height=\"562\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/3Power-Automate-Flow-1.jpeg 623w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/3Power-Automate-Flow-1-300x271.jpeg 300w\" sizes=\"(max-width: 623px) 100vw, 623px\" \/><\/p>\n<pre class=\"lang:css gutter:true start:1\">{\r\n\r\n\"querycontext\":\u00a0null,\r\n\r\n\"value\":\u00a0[\r\n\r\n{\r\n\r\n\"@search.score\":\u00a08.406683,\r\n\r\n\"@search.highlights\":\u00a0{\r\n\r\n\"firstname\":\u00a0[\r\n\r\n\"{crmhit}Jim{\/crmhit}\"\r\n\r\n],\r\n\r\n\"fullname\":\u00a0[\r\n\r\n\"{crmhit}Jim{\/crmhit}\u00a0Harper\"\r\n\r\n]\r\n\r\n},\r\n\r\n\"@search.entityname\":\u00a0\"contact\",\r\n\r\n\"@search.objectid\":\u00a0\"c8dbc8c3-0c9a-ed11-aad0-002248cc94a7\",\r\n\r\n\"@search.objecttypecode\":\u00a02,\r\n\r\n\"fullname\":\u00a0\"Jim\u00a0Harper\",\r\n\r\n\"versionnumber\":\u00a01279956,\r\n\r\n\"statecode\":\u00a0[\r\n\r\n\"Active\"\r\n\r\n],\r\n\r\n\"statuscode\":\u00a0[\r\n\r\n\"Active\"\r\n\r\n],\r\n\r\n\"entityimage_url\":\u00a0null,\r\n\r\n\"createdon\":\u00a0\"1\/22\/2023\u00a04:25\u00a0AM\",\r\n\r\n\"modifiedon\":\u00a0\"1\/22\/2023\u00a04:25\u00a0AM\",\r\n\r\n\"emailaddress1\":\u00a0\"JimOHarper@dayrep.com\",\r\n\r\n\"address1_city\":\u00a0\"Detroit\",\r\n\r\n\"address1_telephone1\":\u00a0null,\r\n\r\n\"parentcustomerid\":\u00a0null,\r\n\r\n\"parentcustomeridname\":\u00a0null,\r\n\r\n\"telephone1\":\u00a0\"313-461-8718\"\r\n\r\n},\r\n\r\n{\r\n\r\n\"@search.score\":\u00a07.212613,\r\n\r\n\"@search.highlights\":\u00a0{\r\n\r\n\"firstname\":\u00a0[\r\n\r\n\"{crmhit}Jim{\/crmhit}\"\r\n\r\n],\r\n\r\n\"fullname\":\u00a0[\r\n\r\n\"{crmhit}Jim{\/crmhit}\u00a0Glynn\u00a0(sample)\"\r\n\r\n]\r\n\r\n},\r\n\r\n\"@search.entityname\":\u00a0\"contact\",\r\n\r\n\"@search.objectid\":\u00a0\"f3baf772-9192-ed11-aacf-6045bd44fb6c\",\r\n\r\n\"@search.objecttypecode\":\u00a02,\r\n\r\n\"fullname\":\u00a0\"Jim\u00a0Glynn\u00a0(sample)\",\r\n\r\n\"versionnumber\":\u00a01075816,\r\n\r\n\"statecode\":\u00a0[\r\n\r\n\"Active\"\r\n\r\n],\r\n\r\n\"statuscode\":\u00a0[\r\n\r\n\"Active\"\r\n\r\n],\r\n\r\n\"entityimage_url\":\u00a0\"\/Image\/download.aspx?Entity=contact&amp;Attribute=entityimage&amp;Id=f3baf772-9192-ed11-aacf-6045bd44fb6c&amp;Timestamp=638091357298094244\",\r\n\r\n\"createdon\":\u00a0\"1\/12\/2023\u00a03:55\u00a0PM\",\r\n\r\n\"modifiedon\":\u00a0\"1\/12\/2023\u00a03:55\u00a0PM\",\r\n\r\n\"emailaddress1\":\u00a0\"someone_j@example.com\",\r\n\r\n\"address1_city\":\u00a0\"Renton\",\r\n\r\n\"address1_telephone1\":\u00a0null,\r\n\r\n\"parentcustomerid\":\u00a0\"dfbaf772-9192-ed11-aacf-6045bd44fb6c\",\r\n\r\n\"parentcustomeridname\":\u00a0\"Coho\u00a0Winery\u00a0(sample)\",\r\n\r\n\"@search.parentcustomerid.logicalname\":\u00a0\"account\",\r\n\r\n\"telephone1\":\u00a0\"555-0109\"\r\n\r\n},\r\n\r\n{\r\n\r\n\"@search.score\":\u00a05.5241776,\r\n\r\n\"@search.highlights\":\u00a0{\r\n\r\n\"name\":\u00a0[\r\n\r\n\"{crmhit}Jim's{\/crmhit}\u00a0Accounting\"\r\n\r\n]\r\n\r\n},\r\n\r\n\"@search.entityname\":\u00a0\"account\",\r\n\r\n\"@search.objectid\":\u00a0\"9014d333-0e9a-ed11-aad0-002248cc94a7\",\r\n\r\n\"@search.objecttypecode\":\u00a01,\r\n\r\n\"name\":\u00a0\"Jim's\u00a0Accounting\",\r\n\r\n\"versionnumber\":\u00a01280040,\r\n\r\n\"statecode\":\u00a0[\r\n\r\n\"Active\"\r\n\r\n],\r\n\r\n\"statuscode\":\u00a0[\r\n\r\n\"Active\"\r\n\r\n],\r\n\r\n\"entityimage_url\":\u00a0null,\r\n\r\n\"createdon\":\u00a0\"1\/22\/2023\u00a04:35\u00a0AM\",\r\n\r\n\"modifiedon\":\u00a0\"1\/22\/2023\u00a04:35\u00a0AM\",\r\n\r\n\"emailaddress1\":\u00a0null,\r\n\r\n\"address1_city\":\u00a0null,\r\n\r\n\"accountnumber\":\u00a0null,\r\n\r\n\"primarycontactid\":\u00a0null,\r\n\r\n\"primarycontactidname\":\u00a0null,\r\n\r\n\"telephone1\":\u00a0null\r\n\r\n}\r\n\r\n],\r\n\r\n\"facets\":\u00a0{},\r\n\r\n\"totalrecordcount\":\u00a03\r\n\r\n}<\/pre>\n<p><strong><em>skip<\/em><\/strong> \u2013 This is another optional parameter of the type number. You can skip a certain number of records using this. The syntax is as below \u2013<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-33927\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/4Power-Automate-Flow-1.jpeg\" alt=\"Power-Automate-Flow\" width=\"612\" height=\"600\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/4Power-Automate-Flow-1.jpeg 612w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/4Power-Automate-Flow-1-300x294.jpeg 300w\" sizes=\"(max-width: 612px) 100vw, 612px\" \/><\/p>\n<p><strong><em>top<\/em><\/strong> \u2013 This is an optional parameter of the type number. You can limit the records to a certain number. The syntax is as below \u2013<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-33926\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/5Power-Automate-Flow-1.jpeg\" alt=\"Power Automate Flow \" width=\"619\" height=\"600\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/5Power-Automate-Flow-1.jpeg 619w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/5Power-Automate-Flow-1-300x291.jpeg 300w\" sizes=\"(max-width: 619px) 100vw, 619px\" \/><\/p>\n<p><strong><em>orderby<\/em><\/strong> \u2013 This is also an optional parameter that can be used to order the results by any particular fields in ascending or descending order. The order by field should be the fields that are available in all the entities in case you are searching through multiple entities. The syntax is as below \u2013<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-33925\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/6Power-Automate-Flow-1.jpeg\" alt=\"Power Automate Flow\" width=\"615\" height=\"604\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/6Power-Automate-Flow-1.jpeg 615w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/6Power-Automate-Flow-1-300x295.jpeg 300w\" sizes=\"(max-width: 615px) 100vw, 615px\" \/><\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>In this way, optional parameters can be used to limit the search as per our requirements.<\/p>\n<h3 style=\"text-align: left;\"><div class=\"su-heading su-heading-style-default su-heading-align-center\" id=\"\" style=\"font-size:15px;margin-bottom:5px\"><div class=\"su-heading-inner\">Work smart with our assistance in automation!<\/div><\/div><\/h3>\n<p><em><strong>Automating mundane Business Operations will save a lot time for newer tasks!<\/strong><br \/>\nOur Inogic- Professional Services Division will help you wind up your codes, optimize them, and make operations easy. Write to us at <a href=\"mailto:crm@inogic.com\" target=\"_blank\" rel=\"noopener\">crm@inogic.com<\/a> right away and embrace the magic of <a href=\"https:\/\/bit.ly\/3l3GlTb\" target=\"_blank\" rel=\"noopener\">Power Automate completely.<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>As demonstrated in our previous blog, we can use the Dataverse search in Power Automate Flow comfortably. In this blog, we will have a look at how the optional parameters are used to limit the search as per our requirements. So, let\u2019s dive in without further ado. To quickly revise everything that we have discussed\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2023\/02\/how-to-use-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":[1985,2361],"tags":[2542],"class_list":["post-33922","post","type-post","status-publish","format-standard","hentry","category-power-automate","category-technical","tag-power-automate-flow"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/33922","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=33922"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/33922\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=33922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=33922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=33922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}