change max length

gdk
Kilo Contributor

Need to change the Max length of description in server module, but the description is referred to the parent table (cmdb_ci) ?

I did change the max_length in dictionary of description in server form but it is effecting all the modules in the cmdb_ci. I need to change the length only in server.

Thanks,

gdk

4 REPLIES 4

Brian Dailey1
Kilo Sage

Hi gdk,



Normally, you would use a dictionary override to alter the properties of an extended table only in the child and not the parent.



However, I do not believe that the max size (for strings) is something that you can override.   I think you would either need to alter it on the parent table (cmdb_ci) or add a custom field to your server table to accommodate.




Good luck,


-Brian


Mike Allen
Mega Sage

The issue is, you are dealing with database elements here.   cmdb_ci is the base table.   You cannot have one length for one table and one for everything else, because you are still moving the data to a single field in the database.   The only way you can do this, without affecting all tables that extend cmdb_ci is to create yourself another field that has the extended length.   But, then, you cannot report on it along with all the other tables.



You could create a new field and write the data to the description field by business rule to neutralize the reporting aspect.   It will be truncated, but at least you could see it.


Rahul Kathuria
Tera Expert

Hi, dictionary overrides will not help in this case as the table is cmdb_ci which is base table of servicenow.



Only option is to create a new field on server table..


Brian Dailey1
Kilo Sage

Hi gdk,



A couple of other questions as to your requirement...



1. Does the max length need to be longer or shorter for your customization?


2. What is the driving force in needing a different max length?



If you need it shorter to restrict entries for some reason, maybe you could just employ the OOB description field and enforce a different length restriction using either a business rule or client script.   More detail on your need may lead to some alternate solutions.



Thanks,


-Brian