Auto populating category and subcategory in cmdb_ci

Suhail2297
Tera Contributor

Hello team,

I wanted to learn how category and subcategory is auto populating in cmdb_ci records....can someone please help me out?

When i checked in dictionary of those attributes then i found it as "Use dynamic value" was checked as "true" and under dynamic filter option this "gs.include("CMDBItem");var item = new CMDBItem(current);item.setCategory();" script was return.

can you please help out in understanding this script and what happens if i disable it?

Suhail2297_0-1740144701309.pngSuhail2297_1-1740144741349.png

 

1 ACCEPTED SOLUTION

Kieran Anson
Kilo Patron

Hi,

The script include CMDBItem based on data from the cmdb_categories table. For example, a windows server (cmdb_win_server) has a category of Hardware, and a SubCategory of Computer.

View solution in original post

6 REPLIES 6

the question would be why would they do this?

This is affecting my integration which populated the category for CIs.

I don't want servicenow to decide this for us.

How should we proceed then?

The value is only set as a default value, so overriding it on insert/update is possible by specifying the value. SN do this, to ensure all CI records have a value in these fields irrespective of whether a company is using them. It allows for consistency in data