Column Search - Prefix match

Column Search - Prefix match

beerygazbeerygaz Posts: 16Questions: 9Answers: 0

I'm using column search fields, and would like to execute the search on a "Starts with" basis or the equivalent of LIKE "<search string>%" in SQL. Right now it matches the characters anywhere in the column content, even with "smart search" set to false.

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    Answer ✓

    Hi @beerygaz ,

    You can use a regular expression column search with this column().search() and add "^" to the start of the search string - that will only match when that string is at the beginning.

    Cheers,

    Colin

  • beerygazbeerygaz Posts: 16Questions: 9Answers: 0

    Thanks for the quick answer colin, I'll give that a try.

This discussion has been closed.