Submitted by WayneK on 2018/11/29 11:55
I need to find a subitem I created yesterday in a large grid with many TLI's and subitems.  I've re-read the Filter section of the manual and have carried out numerous searches and filters with no luck.  In the course of this, I did find the subitem though brute force memory, so now I'm trying to figure out why all my filtering attempts failed.
 
1)   Grid>Column Filter>Check "Filter items at any levels"
 
From the manual: "Filter Items at any levels: All items that meet the filter will be displayed. In addition, parent items will be shown even if they don't meet the filter"
 
 
 
2) ItemCreated column>Nov 28.2018
 
Filter results: blank
 
 
 
The subitem is in the grid with a creted date of 11/28/18.  Why doesn't the date filter find it? Does the date filter not work on subitems?  I know that column filters applied to the item column do correctly display subitems.
 
Wayne
 
 

Comments

Case #2 of my failed searches for the subitem:
 
1) Created a grid with blank source to display all items
 
2) Applied column filter as I did in the first case.  Again, failed to find the subitem.
 
This attempt raised a new question about date filters.  Here is the result applying a date filter range of 11/26/-11/28.  Note that it finds two items created on 11/28:
 
 
Now I re-apply the filter using only the date 11/28, it finds nothing
 
 
Why does it find two 11/28 items when I use a date range, but finds no 11/28 items when I use the exact date?
 
Wayne
111b
 

Most likely because ItemCreated has a time part
 
BTW, why not use the Journal grid. It can list items / subitems created on a given day...
 
 
Pierre_Admin
IQ Designer
 

I'm trying to figure out whether InfoQube filter is working correctly and I'm not understanding or if it's not working correctly.
 
1) - Column filter applied to items will filter both items and subitems. 
    - Column filter applied to ItemCreated will filter only TLI's and ignore subitems that meet the criteria (even though there's an option to filter items and subitems)
    - Is that correct?
 
2) I don't understand your reference to ItemCreated having a time part.  Filtering based on a date should find items for that date, regardless of time.  No?  I don't understand why it finds items for a date when it's included in a range but failed to find items for the same date when it's stand alone.
 
Yes, I'll look at Journal but it's set up identical to the way I have my grid set.  Will continue experimenting to try to figure out why it's not working as expected (including the possibility that my expectations are wrong).
 
Wayne
 

Pierre_Admin

2018/11/29 17:06

In reply to by WayneK

Post year 2000 bug, all dates are actually a double number, with the fractional representing time
So when you specify, Date = Some date, it understands exactly that date, meaning midnight of that day
 
You need to perform some operation on the date, such as int(Date). This cannot be done in a column filter, hence use a range (date to date+1) 
 
The default Journal grid is set up with the Date Filter toolbar which does this automatically for you (at the database level, not at the grid level)
 
 
Pierre_Admin
IQ Designer
 

WayneK

2018/11/30 01:04

In reply to by Pierre_Admin

OK, last try on this question:
 
Does the column filter work on subitems using the ItemCreated column? 
 
A yes or no is all I need.  If it's yes, I'll keep tryiing to figure out what I'm doing wrong.  If it's no, I'll stop wasting my time trying.
 
Wayne
 

WayneK

2018/11/30 10:56

In reply to by WayneK

Tom,
 
I thought maybe it was because subitems usually aren't assigned to the grid but I tried that just now and it still wouldn't work (ie I assigned a subitem to the grid then filtered for its creation date and it still wouldn't show up in the results).
 
But it appears Journal DOES handle subitem dates in a way other grids don't.  If you sort by ItemCreated or ItemModified, it'll sort all the items, including subitems, by that date.  For the subitems, it displays the context parent with it.
 
So a summary of what I think I might know:
 
1) I needed to find a subitem I created the previous day in a grid with many items.  I couldn't remember the parent nor any key words that could be used in a search.
 
2) I thought I could simply filter the grid for yesterday's date and look for the subitem.  This didn't work because the filter only applies to TLI's.
 
3) But Journal did work:  I sorted by ItemCreated, and found that subitems are sorted in the same way as TLI's, and was able to scan down to the correct date and find it easily.
 
Wayne
 
 
 
 
 

Tom

2018/11/30 04:06

In reply to by Pierre_Admin

[quote=Pierre_Admin]
Post year 2000 bug, all dates are actually a double number, with the fractional representing time
So when you specify, Date = Some date, it understands exactly that date, meaning midnight of that day
 
You need to perform some operation on the date, such as int(Date). This cannot be done in a column filter, hence use a range (date to date+1) 
 
The default Journal grid is set up with the Date Filter toolbar which does this automatically for you (at the database level, not at the grid level.
[/quote]
@Wayne, says here "cannot be done in a column filter". I never knew this myself and am not currently on a PC where I can check. Sounds like it would be helpful if there were some indication that filtering on that field will not work (?)

WayneK

2018/11/30 11:00

In reply to by Tom

Tom
 
See my reply above (went in the wrong place).  I need to work through the post year 2000 bug that Pierre refers to so I can understand this better.
 
Wayne
 

Hi Wayne,
 
ItemCreated has date and time. So when you select ItemCreated=11/28/18, your actually asking for items created at midnight that day
To get it to work, you must specify a date range, i.e. from midnight the 28th to midnight the 29 (or any other time range)
 
An alternative way is to use the Journal grid, as you later found out.
 
Finally, you can create an smart field to return just the date part:
  1. Create a new date field, named ItemCreatedDate
  2. In the Source section, enter <source>SELECT int(Created) AS ItemCreatedDate, ID AS ItemID FROM ¯Items;</source>
More info in the User Manual: Smart Fields, which you can find in the Welcome to IQ IQBase
 
You can then show that new field in your grid and filter on it !
 
Pierre_Admin
IQ Designer