Issue importing capability hierarchy - Parent truncated to 32 chars

Graham Roy
Tera Contributor

Hi, I have a multi-level capability hierarchy I was trying to import into our ServiceNow instance. I broke the levels into separate Excel workbooks to make the process straightforward. 

 

As I ran through the 2nd import (Level 1) I noticed that I was getting a message telling me that level 0 capabilities had been created/deleted. I wasn't expecting this as this 2nd import had parent values for every capability in the spreadsheet. I looked at one of the records creating a level 0 capability instead of 1 and I noticed that the "Parent" value was truncated to 32 characters. I checked the temp table definition being used and also the core capability table (cmdb_ci_business_capability) and I can see that "Parent" is a Reference to Business Capability, and that the field length is 32 chars. 

 

I checked other instances of capabilities created as level 0 when they shouldn't have been and in every case the issue is that the parent capability string length is > 32 characters. Oddly, if I create the capability manually it WILL let me pick the parent capability which is > 32 characters!

 

As far as I can tell I can't use SYS_ID or any other reference to mark the parent on the import spreadsheet so I am kind of at a loss as to how I can get these loaded correctly. 

 

Any suggestions would be appreciated.

 

Thanks

Graham

1 ACCEPTED SOLUTION

VenniMakarainen
ServiceNow Employee
ServiceNow Employee

Graham, not fully grasping the issue without sample data but here's a few pointers:

  • reference fields are always 32 chars as they store sys_id of a record in the DB but display the display value of the referenced table
    • cmdb_ci_business_capability display field is 'name', 255 chars by default
  • possibly, the issue gets fixed by increasing the char limit in the import table for the corresponding 'name' field --> avoid truncation --> the actual source value is carried over & system can attempt to match with an existing record (using name aka display value) as expected
  • the import should trigger Business Rules in this case in order to execute existing server side logic on cmdb_co_business capability table

If the above does not help, please involve your dev team / implementation partner for more thorough tech examination.

View solution in original post

1 REPLY 1

VenniMakarainen
ServiceNow Employee
ServiceNow Employee

Graham, not fully grasping the issue without sample data but here's a few pointers:

  • reference fields are always 32 chars as they store sys_id of a record in the DB but display the display value of the referenced table
    • cmdb_ci_business_capability display field is 'name', 255 chars by default
  • possibly, the issue gets fixed by increasing the char limit in the import table for the corresponding 'name' field --> avoid truncation --> the actual source value is carried over & system can attempt to match with an existing record (using name aka display value) as expected
  • the import should trigger Business Rules in this case in order to execute existing server side logic on cmdb_co_business capability table

If the above does not help, please involve your dev team / implementation partner for more thorough tech examination.