- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2021 11:00 AM
Hi all,
I have a requirement and would request help on the same. on cmdb_rel_ci table :
1. Parent class (field) and Child class (field)
2. When parent. class name = 'software' I want on the child field to show or display records 2 child class related records to be shown on the reference icon
'Application' and 'server'
How can the below be achieved
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2021 10:39 AM
Hi,
You can make following changes to the dictionary of Child field on cmdb_ci_rel table to achieve your use case:
Here is the advanced reference qualifier condition:
javascript: (current.parent.sys_class_name=='cmdb_ci_spkg')? 'sys_class_nameINcmdb_ci_appl,cmdb_ci_server':''
Used sys_class names for the CI classes you mentioned.
Software<cmdb_ci_spkg>
Application<cmdb_ci_appl>
Server <cmdb_ci_server>
Also this change will limit classes only when parent is 'software <cmdb_ci_spkg>', for other classes it will show all records.
Please mark helpful and correct if this resolve your issue.
Thanks,
Anil Lande
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2021 12:57 PM
The CI relation table (cmdb_rel_ci.) can't help you the form field level dependency. We did similar user case on other app.
You can use AJAX within OnChange client script for the "Parent" field to call new script include and get a list of sysID for child table.
1) Create Client call Script Include, which will return a list of sysID for child table
2) AJAX call like following sample - get a list of child sysIDs and assigned to child field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2021 07:05 AM
Thanks for the reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2021 06:59 PM
Can anyone help with the logic please?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2021 07:04 PM
Not sure how dependent would help because it is on cmdb rel table so when a single parent class is selected it should show 2 child classes only when reference look up icon is selected.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2021 10:39 AM
Hi,
You can make following changes to the dictionary of Child field on cmdb_ci_rel table to achieve your use case:
Here is the advanced reference qualifier condition:
javascript: (current.parent.sys_class_name=='cmdb_ci_spkg')? 'sys_class_nameINcmdb_ci_appl,cmdb_ci_server':''
Used sys_class names for the CI classes you mentioned.
Software<cmdb_ci_spkg>
Application<cmdb_ci_appl>
Server <cmdb_ci_server>
Also this change will limit classes only when parent is 'software <cmdb_ci_spkg>', for other classes it will show all records.
Please mark helpful and correct if this resolve your issue.
Thanks,
Anil Lande
Thanks
Anil Lande