How to restrict what is being shown under related items in cmdb_ci_linux_server form

vvr
Tera Expert

Hi, I am trying to restrict what is being shown under the related items (as shown in yellow circle) in cmdb_ci_linux_server form. I would greatly appreciate any suggestions.

 

vvr_1-1669828800883.png

 

Thank you.

 

1 ACCEPTED SOLUTION

vvr
Tera Expert

Followed the steps outlined in Formatter View Exclusion Filter at the below link and it is working:

 

https://docs.servicenow.com/bundle/tokyo-servicenow-platform/page/product/configuration-management/t...

 

View solution in original post

4 REPLIES 4

DaveHertel
Kilo Sage
Kilo Sage

Hello - the list of related CI's is being driven by whatever relationship records are in CMDB_REL_CI table.   I'm not aware of a way to filter and/or reduce what is shown in the downstream relationship widget.   If you don't want the relationships to exist, they could be removed from the cmdb_rel_ci table obviously, and therefore not shown in the UI.  But if you have automation (Discovery, etc.) the automation tools would likely need to be tweaked to not replace the relationships.   Discovery will certainly re-create those relationships as a default behavior.  

Perhaps business rules could be built/scripted to remove relationships you don't want or need.

 

My 2 cents:  I'd carefully think if any of those customizations are worth it or not...in the long run.  Someone has to A) understand them and maybe B) document custom solutions or C) train/show others about specialized tweaks over the long run.    Conversely, if OOB is showing more relationships than what you need/want... is there business value in trying to customize solutions to change it.

 

Hope this helps a bit?

vvr
Tera Expert

Hi Dave,

Thank you for the reply. Just to give a little background, I am trying to get the user accounts on a Linux server and then associate those accounts with that server by extending the Linux pattern. For that, first, I am getting the user accounts, second, populating those user accounts in another table and finally associating those accounts with the server using "Create Ref/Relation" operater. I see same is being done to other pattern steps like, Memory modules, etc. but for those items I see the relationship in cmdb_rel_ci table but they are not seen under the Related items and I would like to do the same for user accounts.

 

vvr_0-1669840066808.png

 

cmdb_ci_rel table for "Memory Module" relationship

 

vvr_1-1669840274874.png

It is here as shown in the below picture but they are not seen directly under the Related items as shown in the first message picture.

 

vvr_2-1669840464319.png

 

 

vvr
Tera Expert

Followed the steps outlined in Formatter View Exclusion Filter at the below link and it is working:

 

https://docs.servicenow.com/bundle/tokyo-servicenow-platform/page/product/configuration-management/t...

 

DaveHertel
Kilo Sage
Kilo Sage

The background context is helpful.   User accounts are not Configuration Items, hence they are can not be CI relationships either.  Unless you have a custom table of user records that is inherited somewhere in the CMDB hierarchy (thereby making the custom table a CI class... this would be kinda of kludgy..) 

You could probably have a related list/table of user accts and reference that to the Linux server CI.  But a true user record (sys_user) won't be related to the Linux server as a CI relationship.