- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2017 06:50 AM
Hello,
wondering if anyone has come across this issue, and if so, how they overcame it.
Our naming convention has CIs with names > 32 characters, but when I try to import relationships between them, they are truncated, the names are stored in the ci_cmdb_rel table, truncated down to 32 characters. This causes the relationships to fail.
For example, my import set:
But what is actually stored in the table:
Now, I understand that ServiceNow stores the SYS_ID of each CI, not the Display Name, but what is shown (and what is imported) IS the Display Name.
(from http://wiki.servicenow.com/index.php?title=Reference_Fields#gsc.tab=0 )
This to me is a design flaw. Do I really have to limit my CI names to 32 characters?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2017 05:22 AM
So relations are imported into cmdb_rel_ci table, which means I can just go here and see what was imported:
They show correctly in your instance as well, so not sure where the problem is:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2017 12:40 AM
I am not sure if I understand your exact issue:
- name column in cmdb is 255 characters
- a reference field holds indeed a sys_id of reference record, and can be configured to show the display value from another column of that record
I don't understand what column you have exactly in cmdb_rel_ci for this, can you provide a bit more information?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2017 01:03 AM
I assume it is the Child and Parent columns in cmdb_rel_ci:
These columns are Reference fields, and therefore limited to 32 characters.
To test my problem, simply create two CI's which have names > 32 characters in length, then create an import spreadsheet with a Depends On:: Used By relationship type:
I then go to 'System Import Sets', and choose 'Imp Tmpl CMDB Rel CIs'. I have even changed the field sizes on this table to increase the Child and Parent from 32 to 128:
but regardless, the Child and Parent fields are truncated down to 32 in the 'cmdb_rel_ci' table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2017 01:51 AM
I should point out that I am new to ServiceNow, and it's likely that I am doing something in the incorrect way - feel free to point this out!
For example, I am only using out-of-the-box stuff. I am not using Transform Maps or anything clever.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2017 03:09 AM
So, Child and Parent are both referring to 'name' column in cmdb, which by default is varchar(255). A reference field is varchar(32) because it only stores the reference to a particular record (the reference is the sys_id of that record, which is always 32 chars).
It looks to me that during your import, you're trying to insert into the 'parent/child' reference fields from cmdb_rel_ci not a sys_id but a value of the cmdb 'name' field which in this case will get truncated automatically.
The import set "Imp Tmpl CMDB Rel CIs" looks like a custom one, can you show me how it is defined?