I want to change the maximum length of a column in a custom table.

__ __2
Tera Expert

I am thinking of changing the maximum length of a column in a custom table from 50 to 100.
I understand that the maximum length should not be reduced, but is there anything else I should be aware of?

3 REPLIES 3

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @__ __2 

 

 

 

Go to dictionary of the same field , by right click and there you will find option / field max le length you can replace it with 100.

 

 

 

Just to make sure it is not field which extended from other tables else it impact every where.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Swarup Patra
Kilo Guru

Yes, there are a few things you should be aware of when changing the maximum length of a column in a custom table in ServiceNow:

1. Data Loss: If you are reducing the length, there is a risk of data loss. However, since you are increasing it from 50 to 100, this is not a concern.

2. Performance Impact: Increasing the length of a column can have a performance impact. The larger the field, the more disk space it uses and the slower the database operations. However, the impact may not be noticeable unless you have a very large number of records.

3. Impact on Existing Records: Existing records are not affected when you increase the length of a column. The change only affects new records or when existing records are updated.

4. Impact on Integrations: If the table is used in any integrations, you need to ensure that the change does not break the integration. The system interacting with ServiceNow should be able to handle the increased length.

5. Impact on Reports and Dashboards: If the column is used in any reports or dashboards, you need to check if the change affects the reports and dashboards.

6. Testing: After making the change, you should thoroughly test to ensure that there are no unforeseen issues.

7. Documentation: Document the change for future reference and for other developers/administrators who may work on the system.

Here is how you can change the length of a column:

- Navigate to the table by typing the table name in the left-hand navigation filter.
- Open the column that you want to change.
- Change the 'Max length' field to the desired value.
- Click 'Update'.

Remember to do this in a sub-production instance first and thoroughly test before making the change in the production instance.


nowKB.com

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

Reducing might be a risk, though also increasing might be a risk. Most cases it won't be. Though in your case, we don't know your custom table structure, so can't tell.

For example: increasing a field like user_name on the sys_user table, looks harmless right, just increasing? Wrong = BAD PRACTICE in case of the user_name field on sys_user! One of the issue can be that other tables are referencing such fields (or not really as reference, though scripted, to a string field, etc).

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn