Submitted by Tom on 2012/03/22 10:49
 
Disclaimer:
I'm a total noob with Filters - have two set ones that I regularly use, apart from that I only use the column filters.
 
Am I doing samething wrong here?
 
Grid looks like this:
 
 
When I eventually found "Filter applies to sub-items" I set that to on (is there a reason it's not on by default in a new file?)
"Temporary" field is shown as Tmp in the grid.
 
 
I apply filter: Temporary is null
result is:
 
 
Item "Testing" is correctly hidden, but why are all the subitems hidden?
How do I get the sub-items to show?  I mean *filtered*.
 
 
Hierarchy & Full Hierarchy are on.
Other settings:
 
 
 
Whassup ???
 

Comments

The reason is "simple" : the remaining item is meeting both filters : source + secondary filter. :)
 
However, it's true that if you look at it from another perspective, it's a bit confusing : the source filter isn't always applied to sub items as it depends on the hierarchy settings (full or not). In fact the source (as filter) is only applied to sub items in 2 situation AFAIK (off the top of my head)  : 1- when the secondary filter is effective and applied to subitems, 2- when at least one item meets the source and full hierarchy is off...
 
I'm used to it so I don't notice it anymore. But yes, I think it's safe to say that it's a tad confusing.
 
--------------------------------------------------------------------------------
Windows XP Home Edition, Service pack 3
Dell Vostro 1500, Ram:3gb, CPU: Intel Core2Duo T7500 2.2ghz

Tom

2012/03/22 17:42

In reply to by Armando

[quote=Armando]
The reason is "simple" : the remaining item is meeting both filters : source + secondary filter. :)
 
However, it's true that if you look at it from another perspective, it's a bit confusing : the source filter isn't always applied to sub items as it depends on the hierarchy settings (full or not). In fact the source (as filter) is only applied to sub items in 2 situation AFAIK (off the top of my head)  : 1- when the secondary filter is effective and applied to subitems, 2- when at least one item meets the source and full hierarchy is off...
 
I'm used to it so I don't notice it anymore. But yes, I think it's safe to say that it's a tad confusing.[/quote]
 
OK so this is the problem I come up against everytime I try to filter - once a year or so :-)
 
1) How do you filter sub-items - with column filters?
 
2) You're used to this behaviour - but do you see advantages to it?
 
> the source (as filter) is only applied to sub items [...]  1- when the secondary filter is effective and applied to subitems
I cant see any logical reason for this behaviour - in fact it seems the opposite of logic to have filter applied to sub-items resulting in sub-items not being shown at all (and no way of showing them filtered).
 
 
Sorry for bringing this up in the middle of an update!
I have other grids with filters that seemed to work - on rechecking I see that "Filters apply to sub-items" was turned off - so I'd obviously come up against this problem before and had forgotten it...
 
 
(no need to respond here, I was confused as I had forgotten this behaviour - at least I know now it's expected...)
 

Pierre_Admin

2012/03/22 21:27

In reply to by Tom

With the recent improvements to column filters, I think this is the way to go...
 
That said, I tried to reproduce the issue, without success. When I tried it, I got the main item and all sub-items with blank tmp.
 
Could  you try to compact and repair ?
 

Armando

2012/03/22 23:03

In reply to by Pierre_Admin

Pierre is of course right. It was an issue a long time ago. but not anymore. You might have a problem with your DB.
 
What still happens though is that, when using normal hierarchy (not full) :
 
1-  only sub items meeting the source will show up when at least one sub meets the source, all others (not meeting the source) won't...
 
2- But when no sub items meet the source at all, all of those will show up. Which is a but counter intuitive.
 
[Note that I'm currently using W5]
 
--------------------------------------------------------------------------------
Windows XP Home Edition, Service pack 3
Dell Vostro 1500, Ram:3gb, CPU: Intel Core2Duo T7500 2.2ghz

To understand and help you on this, I'd need to see the IQ field in the grid. Also Tmp is the same as Temporary ?
 

Armando

2012/03/22 17:16

In reply to by Pierre_Admin

True... I inferred that his subs weren't meeting the source, but maybe they are, actually.
 
--------------------------------------------------------------------------------
Windows XP Home Edition, Service pack 3
Dell Vostro 1500, Ram:3gb, CPU: Intel Core2Duo T7500 2.2ghz

Tom

2012/03/22 17:28

In reply to by Armando

[quote=Armando]
I inferred that his subs weren't meeting the source, but maybe they are, actually.[/quote]
 
you're correct there Armando.
Subs *not* meeting source.
 

Tom

2012/03/22 17:30

In reply to by Pierre_Admin

[quote=Pierre_Admin]
Also Tmp is the same as Temporary ?
[/quote]
 
Yes.
 
> To understand and help you on this, I'd need to see the IQ field in the grid.
TLI's have IQ field ticked
 

 
Point taken about using column filters but I may as well follow this one through at this stage.
I'm confused by the contradictory responses above - Armando seems to agree it exists & then says it's an older problem that no longer exists.
 
[quote=Pierre_Admin]
That said, I tried to reproduce the issue, without success. When I tried it, I got the main item and all sub-items with blank tmp.[/quote]
 
Here, in an new empty database (attached - hopefully!)
  • created grid "IQ",
  • created "Temporary" field
  • added items as here.
Settings:
  • Full hierarchy (& hierarchy)
  • Filter applies to sub-items
  • Save item state
 
 
 
Here, with filter enabled:
 
 
If I refresh, I get an expandable arrow for the item - if I click this, it goes back to the dot -as seen here- without showing any sub-items
 
 
 
EDIT / change extension of attachment to SNDB
 
 
-------------------------------------------------------------------------------
Win 7 Pro 64bit ~ Portable IQ  0.9.25.W7A

Please items, parents, hierarchy, full hierarchy, context parents for an ongoing discussion about all the confusing aspects of how filtering works (and doesn't work) in IQ. Personally I think we need to rename/refactor filtering in general - http://www.sqlnotes.net/drupal5/index.php?q=node/1965#comment-11524. Until then I'm not even sure how to go about documenting it since its so confusing (both the expected behavior and the current bugs).
 
d

jan_rifkinson

2012/03/26 12:14

In reply to by reesd

I think you definitely have a point here. 
IQ has so many  possible variables built into it that (1) it makes it fabulous when manipulating data (2) extremely complicated for anyone except techies / experts. 

Tom

2012/03/26 13:45

In reply to by reesd

[quote=reesd]
Personally I think we need to rename/refactor filtering in general - http://www.sqlnotes.net/drupal5/index.php?q=node/1965#comment-11524. Until then I'm not even sure how to go about documenting it since its so confusing (both the expected behavior and the current bugs).[/quote]
 
Yes!
I think the filtering pages in the manual need to
  1. direct people toward column filtering, and
  2. warn people about any quirky filter behaviour in advance
Likewise with Hierarchy - but I think there is even more of a problem with that, as it's not so easy to say "dont use it"
 
============
PS (just curious at this stage) can anyone confirm my problem above (the filtering one) ?
 

Armando

2012/03/26 15:18

In reply to by Tom

I'm easily able to reproduce your problem in a sample DB. I'm trying to figure out why I can't in my own... Will be back.
 
--------------------------------------------------------------------------------
Windows XP Home Edition, Service pack 3
Dell Vostro 1500, Ram:3gb, CPU: Intel Core2Duo T7500 2.2ghz

Armando

2012/03/26 15:26

In reply to by Tom

Can you try the same thing but a field not named "temporary" ?
 
Seems like Temporary or tmp are names that conflict with something else. Pierre ?
 
--------------------------------------------------------------------------------
Windows XP Home Edition, Service pack 3
Dell Vostro 1500, Ram:3gb, CPU: Intel Core2Duo T7500 2.2ghz

Tom

2012/03/26 15:36

In reply to by Armando

[quote=Armando]
Can you try the same thing but a field not named "temporary" ?
 
Seems like Temporary or tmp are names that conflict with something else. Pierre ?[/quote]
 
Yeah, you've got it Armando - I would choose a field that is somehow not allowed
lol
i.e. works as expected with another field (I just used an existing field: TaskIsSummary )
 

Pierre_Admin

2012/03/27 01:11

In reply to by Tom

Wow !
 
That is quite the catch my friends. As it turns out there is a whole slew of reserved names:
 
 
Apparently, this is only an issue in certain very specific cases.
 
One solution is to enclose the field with [ ] e.g.: [Temporary] is null
 
However, I also found that this issue is specific to the "is" operator and have found a way around this. So... Fixed in v0.9.25W9 !
 

Armando

2012/03/27 12:48

In reply to by Pierre_Admin

--------------------------------------------------------------------------------
Windows XP Home Edition, Service pack 3
Dell Vostro 1500, Ram:3gb, CPU: Intel Core2Duo T7500 2.2ghz

Tom

2012/03/27 14:14

In reply to by Pierre_Admin

[quote=Pierre_Admin]
Wow !
 
That is quite the catch my friends. As it turns out there is a whole slew of reserved names:
 
[...]
 
However, I also found that this issue is specific to the "is" operator and have found a way around this. So... Fixed in v0.9.25W9 ![/quote]
 
yay, well done