Business Central 2024 wave 2 (BC25): New options for Search in lists (Modern Search and new OptimizeForTextSearch property)

Dynamics 365 Business Central

Hi, Readers.
The public preview for Dynamics 365 Business Central 2024 release wave 2 (BC25) is available. Learn more: Link.

I will continue to test and share some new features that I hope will be helpful.

In this post, I would like to talk about New options for Search in lists (Modern Search) in Business Central 2024 release wave 2 (BC25). This is not yet documented in the Business Central 2024 release wave 2 (BC25) release plan and AL Language extension changelog Version 14.0.

I shared this information on SNS about two weeks ago, Linkedin.

The source of this news came from the BC Yammer Group, a post from Blazej Kotelko.

PS: aka.ms/BCYammer: Dynamics 365 Business Central Partner Community (Formerly: Development)
More details: About Business Central partner community on Viva Engage (formerly Yammer)

Partial excerpt:

Allow to change data search method in lists

Users can switch between the “legacy” search (search in all possible columns) and the “modern” search (search in columns optimized for text search where the algorithm can do a full-text match).

The default method is controlled by using the feature switch in the Feature Management page or by controlling the behaviour of the search box for each page using a new control in the page search box:

Additionally, the new full-text search is more flexible.

As an example: with the item named “LONDON Swivel Chair” available in the demo data set and when the user searches for: London chair

  • the “legacy” search does not find anything because there’s no exact match
  • the “modern” search does easily find that item

The “modern” search also allows to enclose search term in quotes to narrow the result (similar to popular search engines):

  • The search term blue chair shows all possible blue chairs (items that match both the word blue and chair)
  • The search term “blue chair”shows nothing because the item description in demo data are formatted as “chair, blue” (this result is similar to the “legacy” search experience)
https://www.yammer.com/dynamicsnavdev/threads/2938998262177792

Update 09/21/2024: Change the data search method in lists

Business value
Giving users fast access to data is key. This feature introduces a modern search option on lists that focuses exclusively on columns that are enhanced with full-text search capability, while retaining the option to use the older method. The modern search accelerates the search process and delivers more precise, relevant results, which increases user satisfaction and productivity.

Feature details
Users can switch between the “legacy” search, which searches across all columns, and the “modern” search, which searches only in columns optimized for full-text search matching. The modern search is available for selected tables/lists.

https://learn.microsoft.com/en-us/dynamics365/release-plan/2024wave2/smb/dynamics365-business-central/change-data-search-method-lists?wt.mc_id=DX-MVP-5004336

This is now available in Business Central 2024 release wave 2 (BC25) public preview. But first let’s take a quick look at what Search in lists functionality is.

Searching: At the top of each list page, there’s a Search list. Search action that provides a quick and easy way to reduce the records in a list and display only those records that contain the data that you’re interested in seeing.

More details: Sorting, Searching, and Filtering

Now on the right side of the search box, there is a downward arrow. Click it to choose whether to use an legacy search or modern search (faster).

PS: This feature is enabled by default in newly created environments. For upgraded environments, go to the Feature Management page and enable Feature: Use optimized text search in lists.

First, let’s look at the example given by Microsoft: with the item named “LONDON Swivel Chair” available in the demo data set and when the user searches for: London chair

  • the “legacy” search does not find anything because there’s no exact match
  • the “modern” search does easily find that item

If you only enter one word, this makes no difference, but when you enter multiple words, you don’t need them to be exactly the same to find the results.

However, please note that this cannot be searched in multiple fields. If you want to search more than two fields, please use the Filter feature.

In addition, Microsoft added a new table field property in this version (BC25), OptimizeForTextSearch property, which is mentioned in AL Language extension changelog Version 14.0.

Added a new property “OptimizeForTextSearch” on table fields of textual type, which specify if the field is included in a text optimized search index for faster word based filtering. A property “IsOptimizedForTextSearch” has also been added on FieldRef to check if a field is included in text optimized index.

(property) OptimizeForTextSearch: Boolean
Include the field in the optimized text search index to allow faster search in the UI.

Note:

The property ‘OptimizeForTextSearch’ can only be used if the field’s type is one of these values: ‘Code,Text’.AL AL0844

The property ‘OptimizeForTextSearch’ cannot be customized.AL AL0246

Let’s look at a simple example. I added a new field to the Item table with a value equal to “No. + Rec.Description”.

If OptimizeForTextSearch = true:

If OptimizeForTextSearch = false (Default):

According to my test the default value is false. So in the standard code, you can see that Microsoft sets this property for fields that need to be searched.

Finally, as the developer should have guessed, variables cannot be searched.
PS: Dynamics 365 Business Central: Why can’t users sort, search, or filter certain fields on the page?

That’s all. Give it a try!!!😁

PS: Mr. Stefano Demiliani also discussed this topic, you can refer directly to his article.
Dynamics 365 Business Central 2024 Wave 2: new Search in List pages (but don’t abuse of it)

Update: What’s new: Data search improvements (for developers)

What’s new: Data search improvements (for developers)

END

Hope this will help.

Thanks for reading.

ZHU

コメント

Copied title and URL