AnsweredAssumed Answered

what is the best way to trim names for searches?

Question asked by Francesca Shiekh on Jan 24, 2018

We have some users who tend to cut and paste and sometimes insert a space at the front of a name when creating/importing a record.

I can trim that name in a before_save logic hook, per module, but we already have a bunch of such names (sigh), and the problem could be repeated in other fields that users search by.

 

The problem is that the records with a space in front of the name do not come up in list view or relate field searches.

What is the best way to ignore leading spaces in searches?

I could set 'search_wildcard_infront' => true, to cover that eventuality but that may give many more hits than I really want.

 

thanks,
FrancescaS

Outcomes