You can create new object links that you can then use for data filtering. For more information, see Linking unlinked business objects.
You can define filter rules that limit the results returned by one object based on the value of another object. You can use either a filter query on your filter rule, or you can specify a runtime value.
The following example shows how to display only those Configuration Items (CIs) that are associated with the selected user on the Incident window. Because we want to limit the CIs that are displayed on the Incident window, the filter rule is based on the Configuration Item attribute on the Incident object.
For more information about using a runtime value, see Data filtering using a runtime value.
In our example, we are going to use a filter query that selects only CIs that are associated with the Raise User for the incident.
If there is already a suitable filter query, you can select it in the list.
For more information about creating filter queries, see Filters.
Notice that the Module and Business Object for both the Based On group and the Filter By group are already defined. The Based On object is the related object for the attribute that you are setting up the filter selector for (in our example, Configuration Management\Configuration Item). The Filter By object is the object that the attribute for the filter selector is on (in our example, Incident Management\Incident). This means that when you add criteria to the filter query, you will be matching attributes on the Configuration Item with attributes on the Incident.
You can also add any attributes that you want to use on a complex list on a window design (for more information about complex lists, see Complex lists).
We want to specify a runtime value that selects the CIs that are associated with the Raise User for the incident. CI to User is a many-to-many link: a user may have many CIs (a computer, a monitor, a printer, and so on), and a CI may be associated with many users (for example, a networked printer). For this reason, there is a collection of User Configuration Items on the Configuration Item object. It is the User attribute on this collection that we want to filter by.
This means that we want a criterion of User Configuration Items.User Is Equal To (Raise User).
In addition to specifying an absolute value or a runtime value for the criterion, you can select a Condition that sets the criterion in itself, such as Is Current User. Selecting Is Current User for our example would display all CIs associated with the current user, which is not what we want. We want the CIs that are associated with the user that the incident was raised for – the Raise User. To do this, we need to set a runtime value for the criterion.
To modify an existing filter rule, select it in the Filter Rules list, then click Modify.
You could create another filter rule so that only CIs that are of the CI Type selected on the incident are selected. You do this by matching the Class Type for the CI with the Configuration Item Type selected on the Incident, as a runtime value.
That is: AND Class Type Is Equal To (ConfigurationItemType)
Wherever possible, set a filter on an attribute that is specific to the relevant business object, rather than on an attribute that is inherited from another business object. If you must create a filter on an inherited business object (that is, if the attribute that it is filtered by is only available on the inherited business object), then when you create the filter rule, you need an extra condition so that it is applied only for a specific type of business object.
For example, on the Incident business object, an attribute filter on the Process/Raise User needs to filter the users by the Customers selected on the Incident window. This works correctly for the Incident. However, you cannot select a Raise User on the Change business object because the Raise User attribute is inherited from the Process business object, so it always tries to filter by Incident/Customer. Using this example, you cannot define this filter on the Process/Raise User attribute, because Customer is not part of the Process business object, but is native to the Incident business object. Therefore, the filter must remain on the Incident/Raise User, but must not be applied to other business objects. You can achieve this by adding a filter condition to apply the filter only if the Business Object is Incident.
Copyright © 2019, Ivanti. All rights reserved.