Exclude expression onglobal search
Exclude expression onglobal search
acdigital
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
This discussion has been closed.
Answers
You would need to use a regular expression. Perhaps something like
NY [^C]
.Allan
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?
Ok, lets consider an expression with different names.
All the cities in the "Quebec" State/Province except "Montreal"
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
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
Thank you Allan!