Exclude expression onglobal search

Exclude expression onglobal search

acdigitalacdigital Posts: 9Questions: 3Answers: 0

Hello, I created an advanced search with all the columns of my database, I have also the first search field called Global Search.
I would like to know how can I exclude one expression from the search. E.g. Considering I have columns State and City, I want to load all users from NY State expect the ones from NY City. So, how do I to exclude NY city from the search and search results?

My example: http://goutam.webigniter.ca/datatable.html

Answers

  • allanallan Posts: 63,488Questions: 1Answers: 10,467 Site admin
    edited November 2014

    I want to load all users from NY State expect the ones from NY City.

    You would need to use a regular expression. Perhaps something like NY [^C].

    Allan

  • acdigitalacdigital Posts: 9Questions: 3Answers: 0

    Hi Allan, thanks for the super prompt answer.
    Where and how should I use NY [^C] ?
    Could I, for instance to create a (-) checkbox next to the city field or and any other text field and add [^C] to combine with the desired exclusion word? For example: City Field I type New York and select this checkbox like (<a hef="[^C]">-</a>) and this would find all cities except New York?

  • acdigitalacdigital Posts: 9Questions: 3Answers: 0

    Ok, lets consider an expression with different names.
    All the cities in the "Quebec" State/Province except "Montreal"

  • acdigitalacdigital Posts: 9Questions: 3Answers: 0

    I got your suggestion and it works perfect. I just need to do something like copy entered value to [^value] in my <a> (-)</a> link. another important question Alain is ask where to find all the search options like [^*] in the documentation? Many thanks again.

    Paulo Lopes

  • allanallan Posts: 63,488Questions: 1Answers: 10,467 Site admin

    where to find all the search options like [^*] in the documentation?

    That's a regular expression. Regex is not documented on this site as it is part of the Javascript standard. This is the site I tend to use myself for regex reference: http://www.regular-expressions.info/ .

    Allan

  • acdigitalacdigital Posts: 9Questions: 3Answers: 0

    Thank you Allan!

This discussion has been closed.