Changing max length field in existing table

ozdavidd
ServiceNow Employee
ServiceNow Employee

Hey team,
I do know know that according the the documentation although it is possible to change the max_length attribute of an element, it is considered bad practice to decrease this value.
However my question concerns the increase of this attribute. We had an external defect from the customer who requested the max_length to be increased. This change will require development time as other modifications are needed. The question is: would it be acceptable to suggest to the customer to increase the max_length of that field from the default 40 to, for example, 200 as a workaround? The consequence is that during an upgrade, their change will override ours, but we will decide on the number in this workaround.

Thanks ahead!

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@ozdavidd 

My thoughts

1) increasing length is safe as compared to decreasing which might cause data loss.

2) Yes there will be upgrade conflicts, but you can check the skipped records and customer can handle it.

3) You will have to ensure any integration if updating that field needs to be informed about this so that if required then can send longer text.

4) document the change and clearly communicate to the team

5) discuss next on long term solution as this is a temporary workaround

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

4 REPLIES 4

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @ozdavidd 

You can increase the max length; that’s not an issue. It will show as a skipped record during the upgrade, so you can keep your custom version instead of the out-of-the-box one. However, before increasing the length, get a business case and examples explaining why you need to increase it to 200. Are many records having long names, or is it usually between 2-10 names only?

*************************************************************************************************************
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]

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

Ankur Bawiskar
Tera Patron
Tera Patron

@ozdavidd 

My thoughts

1) increasing length is safe as compared to decreasing which might cause data loss.

2) Yes there will be upgrade conflicts, but you can check the skipped records and customer can handle it.

3) You will have to ensure any integration if updating that field needs to be informed about this so that if required then can send longer text.

4) document the change and clearly communicate to the team

5) discuss next on long term solution as this is a temporary workaround

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@ozdavidd 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Thanks!