Question
4
Replies
565
Views
Veteran Affairs
Posted: October 19, 2015
Last activity: October 30, 2015
Closed
Customize repeat grid column filter
We have a request from our customer to be able to filter a repeat grid column without exact match in the search text. In this case we have a SSN column and they do not want to have to type the hyphens in the search text, they want that to be optional. They also want the filter search text to be a begins with search; for example "1234" in the box would return 123-45-6789 and 123-48-7654 and any others that start with 123-4. Is this possible?
It seems like we should be able to do this, because we know that the item in the database is in the format of precisely 123-45-6789. Perhaps we can strip all non-number characters from the input string, then add in hyphens in the appropriate place before passing it over as a filter for the results.
This approach will only work if they're searching from the start of the string, though - it won't work for the middle of the string since we'd be adding hyphens to the wrong places.