relationships undefined name

DSLKTB
Tera Contributor

Hi all,

 

I used to be able the see the name of the CI to which another CI was mapped to in the Relationships tree. But for some reason, even though the relationships are still there, the name of the CI is "undefined". Any idea why?

DSLKTB_0-1767970669909.png

Thank you for your help

 

2 ACCEPTED SOLUTIONS

Hi there,

Thank you for the update. Since the Name field is populated and permissions are ruled out, this is becoming more interesting.

Here are the next troubleshooting steps, including when to involve ServiceNow Support:

1. Check the Dictionary Display Value The Relationship tree displays whatever field is marked as Display=true in the dictionary, not necessarily the "Name".

  • Go to System Definition > Dictionary.

  • Filter by Table = [The Child Class Name] and Display = true.

  • Check: Is a different field (like serial_number or asset_tag) set to true? If that field is empty on these records, the tree shows "undefined".

2. Check for Browser Console Errors (F12) Sometimes the data is there, but the script rendering the tree crashes.

  • Press F12 (Developer Tools) and go to the Console tab.

  • Refresh the page/form.

  • If you see red text/errors related to ng_relation_formatter or Angular, the interface is failing to parse the data.

3. Open a Support Case If the Dictionary is correct (Name is set to Display) and you still see "undefined", this might be a defect in the Relationship Formatter macro or a corrupt relationship record.

  • Please raise a case on Now Support (HI).

  • Provide them with the specific CI SysID and the screenshot. They can debug the backend macro to see why it is failing to fetch the label.

If this response helps you solve the issue, please mark it as Accepted Solution.
This helps the community grow and assists others in finding valid answers faster.

Best regards, Brandão.

View solution in original post

Hi Brandão,

 

I'd like to thank you for your time helping me troubleshoot this issue, and provide potential solution.

 

I have since found the issue, which is self-made...

I created a custom attribute on the cmdb_ci table and enabled by mistake the Display (value for reference table) to true.

Since I set it back to false the issue is gone. The cmdb_rel_ci table is now back to normal...

 

Thanks again for your assistance,

Have a nice day,

DS

View solution in original post

7 REPLIES 7

SumanthDosapati
Mega Sage

@DSLKTB 

Is the name shown as undefined in cmdb_ci table also? 

Or check if it is a broken reference (for example deleted record's sys_id)?

 

Regards,
Sumanth

Itallo Brandão
Tera Guru

Hi there,

Looking closely at your screenshot, I noticed that the main CI at the very top of the form is displayed as <No name>.

This strongly suggests that this is a Data Quality issue rather than a system bug.

The Explanation: The Relationship Formatter (the tree view) relies on the name attribute of the CI to generate the label for each node. In JavaScript/Angular, if the system tries to retrieve the value of a field that is null or empty to display it as a label, it often defaults to the string "undefined".

Troubleshooting Steps:

  1. Check the Data: Open one of those related CIs (the ones showing as undefined) in a standard list view or form view.

  2. Verify the Name Field: Is the Name field actually populated?

    • If the Name is empty, that is the root cause. You likely have a Discovery source or Import Set that is creating CIs without a valid name.

  3. Check ACLs (Less likely): If the Name field is populated but you still see "undefined", verify if you have Read Access (ACL) to the name column of those specific classes. However, usually, ACL issues display blank or "Security constraints" rather than "undefined".

My bet is on empty name fields in the database.

If this response helps you solve the issue, please mark it as Accepted Solution.
This helps the community grow and assists others in finding valid answers faster.

Best regards, Brandão.

DSLKTB
Tera Contributor

Hi, 

Thanks you both for your swift response. The table name is populated. I have admin right on the whole instance, unlikely it's related to access issue

DSLKTB_0-1768207797762.png

 

Hi there,

Thank you for the update. Since the Name field is populated and permissions are ruled out, this is becoming more interesting.

Here are the next troubleshooting steps, including when to involve ServiceNow Support:

1. Check the Dictionary Display Value The Relationship tree displays whatever field is marked as Display=true in the dictionary, not necessarily the "Name".

  • Go to System Definition > Dictionary.

  • Filter by Table = [The Child Class Name] and Display = true.

  • Check: Is a different field (like serial_number or asset_tag) set to true? If that field is empty on these records, the tree shows "undefined".

2. Check for Browser Console Errors (F12) Sometimes the data is there, but the script rendering the tree crashes.

  • Press F12 (Developer Tools) and go to the Console tab.

  • Refresh the page/form.

  • If you see red text/errors related to ng_relation_formatter or Angular, the interface is failing to parse the data.

3. Open a Support Case If the Dictionary is correct (Name is set to Display) and you still see "undefined", this might be a defect in the Relationship Formatter macro or a corrupt relationship record.

  • Please raise a case on Now Support (HI).

  • Provide them with the specific CI SysID and the screenshot. They can debug the backend macro to see why it is failing to fetch the label.

If this response helps you solve the issue, please mark it as Accepted Solution.
This helps the community grow and assists others in finding valid answers faster.

Best regards, Brandão.