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)
- Search rows is an Action in the Dataverse connector and you’ll be able to see it like this
Enable Relevance Search
- 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 –
- 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.
- 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 –
- Now, once you have selected the Search rows action, below are the features which I’ll explain one by one –
- 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.
- 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
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.
- Row Count denotes how many records should the results Return which is standard across other Dataverse actionss.
- Also, Row Filter uses OData style filtering which we’ll omit in this example to keep it simple. 😊
- 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 –
- 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 –
- 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 –
- 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.
- 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
- 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 –
- Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
- Invalid XML issue in Dataverse connector for List Rows action | Fetch XML Query | Power Automate
- FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
- Invalid type. Expected Integer but got Number error in Parse JSON – Error at runtime after generating Schema | Power Automate
- Asynchronous HTTP Response from a Flow | Power Automate
- Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
- Tag a User in a Microsoft Teams post made using Power Automate
- Converting JSON to XML and XML to JSON in a Flow | Power Automate
- Formatting Approvals’ Details in Cloud Flows | Power Automate
- Office 365 Outlook connector in Cloud Flows showing Invalid Connection error | Power Automate
- Read OptionSet Labels from CDS/Dataverse Triggers or Action Steps in a Flow | Power Automate
- Setting Lookup in a Flow CDS Connector: Classic vs. Current Environment connector | Power Automate Quick Tip