Add Additional Filters to CI Relationship Editor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2025 05:25 AM
Hi Team
In CI Form, after clicking on 'Add CI Relationship', when i select a relationship type in 'Suggested Relationships', filter conditions get populated. I understand that the filter is divided into 2 types - one is class and another is user preference.
Now i wanted to add additional filter condition as (Install Status is Installed), how can we proceed in defaulting the new filter condition?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2025 05:46 AM
Do you want this to apply to all users, regardless of class? If so, you can amend the user preference 'ci_manage_relationships_filter_hint.cmdb_ci' which has 'system' set to true
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2025 12:52 AM
Hi @Kieran Anson ci_manage_relationships_filter_hint.cmdb_ci - this user preference consists of a filter wich is oob and it applies to all classes.
But my use case is:
If the relationship type is "Consumes(Parent) ...", filter condition should be:
By default it should display only
Install Status = Pending Install / Installed / Pending Decommission AND
Class is a "Mapped Application Service"
So, i want to additional filter condition as install state is installed, how can we achieve this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2025 01:46 AM
You would need to customise AddRelationshipQuery, specifically the getQuery function to manipulate the returned value.
- item_id is the ci class (e.g cmdb_ci_computer)
- relationship_id is a string value in the format <direction>:<relationship_value>
- For example Contains (Parent) would be parent:55c95bf6c0a8010e0118ec7056ebc54d
- mode is 'cmdb_ci'
With this information, you can then write additional logic into getQuery to return an encodedQuery that you desire.
Do note, this is a customisation to an OOB script include.