45
Views
2
Comments
searchData do not search all cases when using or not an accent

Hi, 

With searchData from accelerators, when I want to do a research datas by a name for example, I would like to see all datas who're corresponding to that. For example, if I put "lanaudier", I would like to have every data who has "lanaudier" and "lanaudière". Or if I want to search "Martìn", I want to have every "Martin, Martìn, Màrtin, etc".


I know that we can by adding filters in the aggregates, but with the accelerators (notably the searchData), for the GridPreference, I can only have specefic data to what is written in it. Basically, with the searchData, if I write "Martìn", only "Martìn" will come out and not the others if they have other accents or none at all. 


It is possible to get all results with and without accent in the same time ? (Like if i research "é", I would like to have everything with a "e" without accent or a "e" with any accent)


Thanks for helping

2024-01-20 14-53-12
Ahmed Essawy

Certainly, let's delve into the details of implementing an accent-insensitive search in OutSystems. The solution involves normalizing both 

1-The search input.

2-The database text to a common format, devoid of accents. 

Here's the idea behind it:

  • Normalization Function: Develop a helper function in OutSystems that normalizes text. This function will remove diacritics (accents) from characters.

    Replace(Replace(Replace(UserSearchText,"é","e") , "ì" ,"i"),"à" , "a")
  •  Applying Normalization on Data: Apply this normalization function to the text fields in your database that are subject to search. You might need to create additional columns in your database to store the normalized text, ensuring that the original text remains unchanged.
  • Search Input Normalization: Normalize the search input using the same function. When a user enters a search term, the system should process this term to remove accents before executing the search.

UserImage.jpg
Mathéo Christine

Hey ! That's not what I really meant because it is with an accelerator of OutSystensDataGrid. 

So my grid is updated instantly when I put a character in the searchData. I do not want to normalize text. Just know if I write that : 

I can see every Marti something (no matter the diacritics) and not only Martì something without like normalize each data like "automatically". Like do filter in aggregate like that : 

(That kind of filter is not with a Outsystem's accelator searchData and do not highlight but if I write "Black Panther", it shows me Black Panther and Blâck Panther 2.


In my opinion, with accelerator of outsystems datagrid it's not possible to do something because it's from outsystems. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.