Dataverse Search Doesn’t Play Well with Date Columns

Dataverse Search is nothing new to the Microsoft Power Platform and Model Driven apps, but we ran across a scenario for a customer recently that unfortunately we were unable to find a quick answer online.

For those new to the concept, Dataverse Search was added to improve the accuracy over the legacy Quick Find search which still exists in Dynamics 365. It used to be called Relevance Search, as it returns results across multiple tables in a single list sorted by relevance. It also replaced a souped up Quick Find called Categorized Search which basically was Quick Find with multiple lists per table.

The Problem: Date fields aren't supported in Dataverse Search

This client wanted to add a date field to Dataverse Search.  Seems easy right?  Unfortunately, per Microsoft, Date fields are not supported in Dataverse Search.  Even though you add the field to the Quick Find “Find By” fields list, searching on that date field won’t yield results.  If you search in the Quick Find view, the results are returned.

As you can see below, when I search using the Quick Find, the results are returned.

If you perform the same search in the Dataverse Search bar, the results are not returned.

The Fix

Don’t worry, all’s not lost.  The fix may feel a bit messy but is very simple.

First, create a new string column that will hold the same data as the date column (this is why the solution doesn’t feel great as it’s recommended to have two fields with the same data).

Next you need to create a old school Classic Workflow.  Again, the solution doesn’t feel great as anytime you need to build automations you should use Cloud Flows.  Unfortunately, Cloud Flows do not have the ability to run synchronously, and I want my new string field to be updated immediately after save.  Make sure the classic workflow is synchronous and doesn’t run in the background.  The workflow should look like the following with a simple Update step.

After doing this, going forward your new column will be populated when the date column is populated. You’ll also need to update your historic data that already had a value in the original date column.  We recommend using an XRM Toolbox tool like SQL 4 CDS or Bulk Workflow Execution depending on how many historic records you need to update.

 You now need to add it to your Quick Find View’s “Find By” columns so it’s searched with Dataverse Search.  However, after doing this, the Dataverse Search will still not work for this new column.

The next and last step is a bit odd, but it works.  You’ll need to remove your “View” columns and “Find By” columns from the Quick Find View, Save & Publish, add them back, and Save & Publish one last time.  After doing this, searching for the new date “string” column will return results as expected using Dataverse Search.

Wrap Up

The solution is simple but requires a combination of steps that aren’t obvious (e.g., removing / reading columns to the Quick Find View). Our hope is Microsoft adds support for searching Date columns in the Dataverse Search. It’s likely this will get fixed as enhancements are quickly being rolled out with the Power Platform. Until that day comes, the approach above worked for us and our client, and hopefully works for you!