Custom Field Filters

 In New Feature, Reporting and Analytics

UI ExtensionThe UI Extension functionality makes it possible to add custom fields to 4me records.  It was already possible to allow people to search through the content of custom fields.  Now it is also possible to apply custom field filters to views, reports and dashboards.

To indicate that it should be possible to use a UI extension field as a filter, the ‘Filterable’ option has been added to the Snippets section of UI extensions.  By checking the ‘Filterable’ box, the HTML that gets added when the snippet is appended includes the code that tells 4me to make the field available when someone starts to add or update a filter.

For example, the Snippets feature could be used to add a custom field to a UI extension that the support organization needs to specify some extra attributes for its smartphones.  When the ‘Filterable’ option is checked, and the  Append Snippet  button is pressed, the HTML for this field automatically includes the code that ensures the field can be used in filters.

UI extension snippet  HTML of filterable select field

For existing UI extensions, this code can still be added manually to the HTML.

After some custom fields have been made ‘filterable’, it is possible to use them to define filters.  As an example, let’s assume that the following UI extensions fields of a smartphone configuration item are all filterable.

UI extension filled out in CI record

Adding a custom field filter

When someone starts to add a filter for a configuration items view, all four of these custom fields will be offered for selection.

That makes it possible to define a filter that uses the four custom fields to exclude all other configuration items, except for our example CI and the other ones that match the criteria of the filter.

Naturally, it is possible to also use 4me’s standard fields in the filter, but if only the four custom fields of our example are used, the filter could look as follows:

Configuration items view filtered by custom fields

Operators for a text field filterThis example shows that the smartphones that have ‘T-Mobile’ specified in their Carrier name field were successfully found.  That is because the filter looked for a ‘partial match with’ the charters  mob.  Because the Carrier name field is a text field, the options ‘Partial match with’ and ‘Equal to’ were available when the filter was created.

A partial match is found when the text string contains a word that starts with the characters specified in the filter.  If ‘Equal to’ is used, there needs to be an exact match between what is specified in the filter and the value of the custom text field.  Unlike the ‘Partial match with’ operator, the ‘Equal to’ operator is case sensitive.

In this example, ‘Previous week’ is the range that is specified for the custom date field.  That is possible, because the same quick ranges and custom range options are available for custom date fields as for standard date fields.

For a custom select field it is possible to select one or more of the dropdown options that are defined for the field.  That works just like 4me’s standard select fields that can be used in a filter.  The same is true for the organization, person and site fields that can be included in a UI extension.  Adding one of those custom field types to a filter is the same as adding a standard field in which another 4me record can be selected.

Operators for a numeric field filterA custom number field is again a little special.  A whole set of operators is available for such numerical fields.  That allows people to be specific about the values that records need to have in a custom number field in order for them to be included.

The option ‘None’ is always included to make it easy to find records in which a custom field is empty, even though it is supposed to have a value.

Together with the  is not  option, these filter capabilities for custom fields dramatically increase the control that users have over their views, reports and dashboards.

Vertical bar chartTime Entry