Changing field type or deletion of fields as per best practice.

Chandler2
Tera Guru

I created few string fields with limit as 200 character. Now, is it possible to change the field type to HTML?

I changed it to HTML but it is not working, I don't see HTML like field. 

What if I create new field, I can mark the old fields active false or should I delete those fields? What is recommended way? I am concerned that these fields will still move to PROD, will it become chargeable? 

 

One more question: I want to increase the box size of those fields, should I just increase the character to 3000 or 4000 or make it Long or something else?

 

Please suggest.

2 REPLIES 2

Community Alums
Not applicable

Hi @Chandler2 ,

Best Practice for Data Type change = DONT.

If you do this you will loose all data in the column for all records and if the table is huge then it can have performance implications also.

What i can suggest you do is: create a new field with the new data type needed, copy all data form old field to new (using background script)and then delete the old column. If needed change the label of the new column now to be same as old one.

Also, for your information : Delete a field from a table

 

Saurav11
Kilo Patron
Kilo Patron

Hello,

 

It is not really recommended to change the data type. Better to create a new field.

 

For deletion you can surely delete the field, as you rightly pointed out sometimes deletion doe scause issue but if you do it carefully it should not be an issue. To delete it I would suggest it to move the dictionary update of that field to default update set and then delete it in the default update set.

 

So even if it does not get deleted properly as it is no longer in you main update set the old field will not got to PROD.

 

Check the steps below to delete any field:-

 

https://docs.servicenow.com/en-US/bundle/tokyo-platform-administration/page/administer/reference-pag...

 

Please mark my answer as correct based on Impact.