Views – Filtered by related object propertiesBy
When creating a view in the Service Manager console you might want to filter the listed objects based on a related object’s property. Since I got a question last week regarding a scenarios like this, I thought I go ahead and describe how this could be done. In this example I’m creating a view tha lists all change requests that are assigned to a swedish user. Follow the instructions below to create such a view:
- Start by right clicking on the “Change Management” folder and click “Create view”.
- Name the new view, provide a description and select in which management pack you want to store the view.
- Click browse in the criteria section and select “Combination classes” in the “View” drop down list. Select a the combination class called “Change Request (Advanced)” and press OK.
This is the key to success since you want to be able the query a combination class (a type projection) instead of only a simple class. A combination class provides access to related objects and there properties.
- Since you selected a combination class (a type projection) you can now have a search criteria that is based on properties of items that are related to the change request in your view.
- Select the “Assigned To User” in the left pane of the criteria section. Then check the checkbox for the “Country” attribute in the right pane of the criteria section, click the add button and write “Sweden” in the textbox.
- Select which columns to display in your view and close the wizard.
To test the view, make sure you have a user object with the country value “Sweden” and a change request with this user as the “Assigned To” user.
Note: The same method could be used to list all incidents that has affected user that speaks a certain language