Thread for filter queries - I suspect I will have more!
Is it possible to filter for a field NOT having a certain text content
e.g. MyField is NOT "text here"
I cant seem to get it to work here...
EDIT/ it was on the filtering page (5.2.4 Grid Filter Editbox) but I had overlooked it...
Comments
HELP !!! ***
[/quote]
There are 2 reasons :
- IQ doesn't go down the hierarchy until it finds an item meeting the filter condition. It stops looking after the second level.
It's in Mantis (the title isn't very explicit... I was young and inexperienced at the time) :
http://mantis.sqlnotes.net/view.php?id=312
- if the TLI doesn't meet the Filter, it doesn't look further (which is logical since the filter is applied to TLI AND subs). So what you need to do is either find a way so that all items (even the subs) share some elements of the source, or use the column filter.
I wonder if column filter and text box filter should behave approximately the same. It isn't the case at the moment and I don't use the column filter much as there are some restrictions which disturb my workflow (can't show all subs -- alt-click -- when it's on, won't work if the whole hierarchy isn't first expanded, etc.).
[quote]how to exclude more than one colour.
ItemColor is null or ItemColor <> "Red" or ItemColor <> "Orange"
but that didnt work at all
[/quote]
You'd have to use AND instead of OR (you don't want that Color OR that Color excluded, but that Color AND that Color...). And dont forget to add "or itemcolor is null" somewhere... Would be something like :
ItemColor is null OR (ItemColor <> "Red" AND ItemColor <> "Orange")
I havent tried but it should work... depending on what you're trying to achieve.
Note that you can use () to group conditions together. e.g. :
Task AND (ItemColor is null OR (ItemColor <> "Red" AND ItemColor <> "Orange"))
--------------------------------------------------------------------------------
(instead of only searching the first level of sub-items and... stopping there)
...The Ecco way, as you suggested?
See tom's more recent comment about this "problem" :
http://www.sqlnotes.net/drupal5/index.php?q=node/1893#comment-10549 [^]