HOWTO : Filtering for both laptop and workstation at them same time

 
Author
Message
Elite SysAider
121
 
Just though I would share this since I haven't seen many discussions about filters. This applies to 6.5.08 so I don't know how/if possible with other versions

I often wanted to see/export both laptops and workstations at the same time but without having to make them into the same type or having to enter a filter manually every time. So I fooled around a bit and found the syntax for a filter expression (which is basically the same syntax of a SQL Select 'where' clause it seems).

Basically, you click on the Gear icon, click on the '${list.asset.type.caption}' entry under 'Filter Menu' and click Edit. In the Customize List that pops up, enter what is shows for Filter Caption and Filter Expression in the screen shot below then click Add. Now this 'Laptop and Workstation' will appear in the Type drop down list (under All) and by choosing it, you'll see both laptops and workstations at the same time.

Edit: Just to check if the Filter expression was really a SQL Select 'where' clause syntax, I replaced the expression for " c.computer_type in ('Laptop', 'Workstation') " and... it worked

Edit 2: If you want to test if a field is null or not, do something like " c.cust_text1 is null ". I've set filters for 'Blanks' and 'Non blanks' on many of the fields in the DEFAULT view to help me find which assets are missing fields.

Edit 3: It even accepts the 'like' statements with wildcards '%', unlike the 'Filter' statement that only allows 'equal' and 'not equal'. An example (which is pointless since a search would return the same thing but it's just to show the syntax) of this would be " c.parent_group like '%LAB%' " would display anything that has 'LAB' anywhere in its group hierarchy.

This message was edited 5 times. Last update was at May. 29, 2010 03:19 AM

SysAider
11
 
Great tip. Thank you

Any ideas how I can make this affect all views without editing them individually?