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.

Transform Map on Database Instance Field Assigning Server CIs...

jlaps
Kilo Sage

Recently, our CMDB update forms started acting strangely; worked for years, but problems perhaps after recent upgrade. Anyways...

 

When our DBAs are creating/updating their CIs in the CMDB, for reasons unknown recently, the DATABASE INSTANCE reference field is not limiting to only database instances, and is allowing SERVER CIs to be selected during the transform. Transform map step is below-

jlaps_0-1762177398196.png

 

On the DATABASE CI itself, there are dictionary limits so only DB instances can be selected, but when the transform map is running, it is finding Server CIs with the same name and assigning those instead of instance CIs. Where do I need to look to fix this issue? Instead of field map as shown, use a script? Is there no way to just enforce the dictionary on that field?

 

5 REPLIES 5

Kieran Anson
Kilo Patron

Hi,

Just to clarify the process, your DBAs are selecting the database instance as a choice option on the catalog item? Or are they entering the name of the instance, as it doesn't exist, and the transform map is then creating it? But the issue is that ServiceNow is being smart, and matching on name value within the CMDB rather than creating a new record?

The import form is supposed to select the instance by NAME which is provided on the import, and if the name is not found, it is supposed to create it. In the test cases I am using, these database instances DO exist, but its attaching the server CI anyway.

 

Reference qualifier on the field itself-

	
sys_class_nameINSTANCEOFcmdb_ci_database^ORsys_class_nameINSTANCEOFcmdb_ci_db_instance^ORsys_class_nameINSTANCEOFcmdb_ci_appl_sap_hana_db^EQ

 

To fix individually, I just need to double-click in list view, CUT the value, then just paste it right back in and it will attach to the database reference due to the above. I can probably write a fix script, and may have to, to fix this- but I wanted to fix the import process so I could just import the same thing again and have it fix itself preferably. I don't understand why it is grabbing a server CI even if it does have the same name.

 

Thank you.

Is that reference qualifier from the import form you're referring to? Limiting what the DBA can select? Or is that reference qualifier on the target field 'Database reference' ?

That is on the target field, on the database CI that references the database instance. I don't see it on the transform map anywhere, which is why I think its just grabbing the first thing that matches without regard to class. I presume if I change it from direct field mapping to a script?