Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate

As Dataverse connector keeps getting updated from time to time, here’s a new Search rows (preview) Action which you must be seeing in the Dataverse connector in Power Automate. Let’s see how we can use this Action.

As it suggests, that this is still in preview! So kindly take a note of that.

Search Rows (Preview)

  1. Search rows is an Action in the Dataverse connector and you’ll be able to see it like this

Enable Relevance Search

  1. Let’s assume you went ahead and used this connector in your Flow without having Relevance Search enabled in your D365 CE organization, you’ll see the Search Rows throw the below error.


    And the error is described as –

  2. To make Search Rows work, Relevance Search must be enabled for you Dynamics 365 CE / CRM environment. Head over to the System Settings in Dynamics 365 under Settings > Administration > System Settings. And in General tab, look for Relevance Search option, check-mark it and save.


  3. Here’s the full Microsoft Documentation on how to use queries for Relevance Search – https://docs.microsoft.com/en-us/powerapps/developer/data-platform/webapi/relevance-search?WT.mc_id=DX-MVP-5003911

Using Search Rows action

Let’s see how this Action from the Dataverse connector will work –

  1. Now, once you have selected the Search rows action, below are the features which I’ll explain one by one –

  2. Let’s first look at the last item i.e. Return row count. As it says, will result the count of results returned if set to Yes.
    Will return -1 if set to No.

  3. For Search Type and Search Mode to be covered, these need to be explained extensively since it covers several factors. To keep it short for now, I’ve linked the Search Type and Search Mode documentation as below
    https://docs.microsoft.com/en-us/power-automate/dataverse/search#search-type?WT.mc_id=DX-MVP-5003911

    And the short Summary of the same is:
    Search Type:simple | full” There are 2 types called as simple and full. Default = simple. Both have different functions within them that you can use on the Search Term.

    Search Mode: “any | all” By Default – any. This defines if any criteria of the Search Term is to be considered or all must be true based on different syntax and operators used.
  4. Row Count denotes how many records should the results Return which is standard across other Dataverse actionss.
  5. Also, Row Filter uses OData style filtering which we’ll omit in this example to keep it simple. 😊
  6. Now, let’s enter a Search Term and keep it simple, I’ll pick an example: “Contoso“.
    Next, look at the Table filter – If I leave it blank it’ll search for Contoso across all Tables in Dataverse.


    Result to show from all Tables as per the above Search rows term –


    Now, I’ll add account and contact (I do have some records in the Opportunity as well which has the keyword ‘Contoso’. So those will be filtered out)


    And the result will be as follows –


    And if we look at the Raw Outputs to see how data is retrieved, we get the below –

  7. Now, let’s look at Sorting.
    Now, in the Sort by filter, I’ll enter the field name ‘name‘ and desc as the order of the Sort.
    And then, we’ll check the results


    And the results were as below –


  8. Next, let’s look at Facet Query. basically, it drills down on the Results which are already returned as a part of the main query and serve as metadata for the same to gather similar information together.
    Here’s how I enter a Facet query – Ex: contact.address1_city. Meaning, it’ll return Address 1: City from all the returned Data and store it under Facet Query.


    Now, when we run this, we’ll get the following results –


  9. Let’s look at what Skip Rows does.
    It’ll only omit the records from the already returned Results. Example: Even if the Result returned 5 records, it’ll Omit/Skip first x records. But still show that the Results returned are whatever the Query is supposed to return.

    In the below example, out of 5, I’ll skip 4 rows.



    And when you run the Query, you’ll find that the Record Count is 5, but only 1 entry was available in the Output.



Which Columns are Searchable?

There are 2 points to keep in mind to know and configure which all columns will the Search be performed on.

  1. If you are aware of how you can configure the Quick Find views in Dynamics 365 CE, same is applicable here since this works off of Relevance Search itself.
    In any Table/Entity’s Quick Find view, make sure the columns are selected in the Add Find Columns

  2. The ones selected in Find Columns are the ones on which the Search will be performed.

Here’s a YouTube video I made to demonstrate the same –

Hope this was useful!

Here are some more Power Automate / Cloud Flow posts you might want to check –

  1. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  2. Invalid XML issue in Dataverse connector for List Rows action | Fetch XML Query | Power Automate
  3. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  4. Invalid type. Expected Integer but got Number error in Parse JSON – Error at runtime after generating Schema | Power Automate
  5. Asynchronous HTTP Response from a Flow | Power Automate
  6. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  7. Tag a User in a Microsoft Teams post made using Power Automate
  8. Converting JSON to XML and XML to JSON in a Flow | Power Automate
  9. Formatting Approvals’ Details in Cloud Flows | Power Automate
  10. Office 365 Outlook connector in Cloud Flows showing Invalid Connection error | Power Automate
  11. Read OptionSet Labels from CDS/Dataverse Triggers or Action Steps in a Flow | Power Automate
  12. Setting Lookup in a Flow CDS Connector: Classic vs. Current Environment connector | Power Automate Quick Tip

Thank you!