How Can I change max length field in exist table

Gaetano De Mitr
ServiceNow Employee
ServiceNow Employee

Hi,

How Can I change max length field in exist table?

I must update a field with max length 8 to 255 . Field type is String.

max length field not update when I update.

Thanks,

1 ACCEPTED SOLUTION

Once I came across this type of scenario. There were a large numbers of records present in the table where I had to do modifications of an existing field's dictionary.While I tried to change, system hangs.


(That is because while you change anything in the dictionary of field system generally search for every records of that table to find out if any value stored on that field or not )


That was an import set table. So I cleaned up the records in Development instance.Modified the fields dictionary.


This was captured in the update set.So wile moving that update set it just committed successfully and there was no need of clean up these records again in Production.



If you are introducing a new field and that has been not moved to production till now then you can delete it and create a new field and move that to production.


View solution in original post

9 REPLIES 9

Mihir Mohanta
Kilo Sage

Hi Gaetano,



I think there must be a large number of records present in the table where you have added the string field for which you   want to change its length.


If that is the case the you want to clean up the records of the table and then you can change the field length.



Otherwise you need to delete this field and create a new field with length 256.


Thank you for answer,


but...



Why It allows me to change from 8 to 19 max length but not with number more than 19? I need 255.


Moreover, if I make the change on a development instance, and I need to change the production instance (where I can't delete existing records), how I behave in this case?



Thanks,


Once I came across this type of scenario. There were a large numbers of records present in the table where I had to do modifications of an existing field's dictionary.While I tried to change, system hangs.


(That is because while you change anything in the dictionary of field system generally search for every records of that table to find out if any value stored on that field or not )


That was an import set table. So I cleaned up the records in Development instance.Modified the fields dictionary.


This was captured in the update set.So wile moving that update set it just committed successfully and there was no need of clean up these records again in Production.



If you are introducing a new field and that has been not moved to production till now then you can delete it and create a new field and move that to production.


Thank you very much for your answer.


I've resolved my problem!



Regards,


Did you submit a HI-ticket?