Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Adding Custom table in CMDB Query Builder

Suman21
Tera Expert

Hi,

Is there any was we can add the Custom table to be shown in CMDB Query Builder?

I have read some where in the communities that if the Custom table is referenced/extends  from the CI table then only it will show in CMDB Query Builder.

 

Any thoughts/suggestions on this?

 

 

4 REPLIES 4

Maik Skoddow
Tera Patron
Tera Patron

Hi @Suman21 

 

Yes, you can add a custom table to be shown in the CMDB Query Builder in ServiceNow, but there are specific requirements for it to appear as an available class in the builder:

 

1. Table Must Extend a CI Class

  • For a custom table to appear as a selectable node in the CMDB Query Builder, it must extend from a Configuration Item (CI) class—typically, this means it should extend from cmdb_ci or one of its child classes.

  • This is because the CMDB Query Builder is designed to work with the CMDB hierarchy, which is built on tables extending from cmdb_ci. If your custom table is not a child of cmdb_ci, it will not be available as a starting point or node in the Query Builder

2. Reference Relationships

  • If your custom table is not a direct extension of a CI class but references a CI class (for example, through a reference field pointing to cmdb_ci), you may be able to include it in queries, but not as a primary node. Instead, you can build queries that start from a CI class and then reference your custom table through relationships or reference fields.

  • The Query Builder includes tables that have a reference back to a CI class table, not tables that CI classes reference. So, if your table only references a CI class, it may not appear as a selectable node, but you can dot-walk to its data from the CI class.

 

Hope that helps

Maik

sergiu_panaite
ServiceNow Employee
ServiceNow Employee

In order for a table to appear in CMDB Query Builder it needs to be an extension of Configuration Item (cmdb_ci). 

Is your custom table an extension of cmdb_ci?

No, it is not a extension from cmdb_ci table.

That is the reason why I have posted my query in the community to check if there is any other solution to bring custom table to cmdb query builder if it is not extension from cmdb_ci table.

 

But seems it is not possible.

Hi @Suman21 

please check if option 2 in my answer might be an option.

Maik