Filters

Filters are listed on the left hand side of various windows. They are used to filter the display of these windows, allowing an Administrator to quickly find and focus on only certain items.

Each record in the Programs window potentially represents an aggregate of several individual program versions. A search filter looks for satisfaction based on ANY of the individual versions within the aggregate. This can sometimes lead to confusing results.

For example, compare a [search for all programs that ARE published by Microsoft] with a [search for all programs NOT published by Microsoft]. Chances are that there exist program line items (i.e. program variants listed in the Programs window) that satisfy both searches! All it takes is a variant that includes one program version with Microsoft in the publisher field while a second program version (aggregated into the same variant) has no publisher in the publisher field.

Computer and Program filters can also have associated rules which are applied when computers or programs are discovered (or when new information about an existing item is discovered).

Filters can also be used to restrict the scope of reports. With a filter selected, right-click to see the drop down menu which includes a list of all the reports that will accept the selected filter as a restriction. For example, a program filter can be used to restrict any report that deals with programs (e.g. a report whose detail lines are programs).

Filters can be applied to the main window by clicking just to the left of the filter you wish to apply. Doing so will change which programs or computers are displayed in the main window. You can also double-click a filter, which will open up a new window that will display only the filtered items. This window will not have the left-hand section which the main window has. It also has a section at the top where the filter can be edited, and which can either be collapsed or expanded.

Check marks are used in each pane of the Display column (left side of the window) to activate individual Filters, Divisions, Folders, etc. A combination of check marks will select all items that match at least one check marked condition in every pane that is used for the selection (e.g. has at least one check mark). This means that when a pane is being used for selection (so it has at least one check mark), an additional check mark will generally increase the number of items displayed as a match. If an additional pane is activated for the selection (by adding a check mark to a pane that had none), then the number of items displayed as a match will generally decrease.

Filter Dialog

There are two different ways of specifying a filter - either with Match These Values or with Match This Filter. Using Match These Values is the simplest method - there is a graphical interface which shows the various values you can specify. These values correspond to various fields in the underlying database, but it is not necessary to understand the database in order to create a filter - the graphical interface is largely self-explanatory. Specifying multiple values means that all the fields must match your criteria - that is, the conditions which you specify in the graphical interface are combined using the "AND" operator.

Group membership can be specified as a selector when creating a Computer filter in the graphical interface - but the behavior may be surprising! Computers which are members of the group due to a Node, Location, or Division clause in the Group definition will be selected as expected. But a computer that is a member of the group due only to external authentication will not be included among the selected computers when using the filter! This is because authentication generally bases group membership on user name, rather than computer, and it is not terribly meaningful to check the “Last User” for group membership. Also, if a group is specified in a filter, but the group contains only filters, the filter by group will not include computers that match the filter defined in the group - since this extra level of indirection is not necessary.

The Match These Values option allows for custom selection criteria specified using less common fields which are not included in the graphical interface. Also, it allows you to specify multiple values for the same field, or use boolean logic beyond simply the "AND" operator.

If you start out by choosing various conditions in the Match These Values section, and then change to Match This Filter, you will see a text representation of the filter you have specified. The basic format is a series of conditions in parenthesis, separated by " && ". Each condition involves one field name and one constant. Here is a list of rules for writing filters.

Here are some complex examples:

Sample Filters – Import & Export

The standard K2Admin installation includes an xml file, placed in "Sassafras K2/Admin/Misc/", that defines several sample filters. You may find these useful either directly or as a basis for your own further customization. To import only relevant sample filters for use in just one of KeyConfigure's list windows, simply drag the xml file, "Sample Filters.xml", and drop it onto the filters area of the window. Alternatively, the entire set of sample filters can be imported all at once by dragging the "Sample Filters.xml" file and dropping it onto the KeyConfigure program file itself. To save an xml copy the current filters defined for a particular list window, use the Export context menu item under the Filter section label. [Note: these xml files are readable as text, so you may find "Sample Filters.xml" useful to look at even without importing.]