Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

How to restrict character limit of a string field?

Manikandan Subr
Kilo Guru

Hi, Taking description field in Incident table as an example. I have set the Max length of description field to 4000 characters. But when i update this field through a script( i am not sure if the same happens when i update manually), i can even update 50000 characters. I dont want this to happen. Irrespective of the method of update, this description field should not take more than 4000 characters.

How do i add this restriction on the description field. 

1 ACCEPTED SOLUTION

Hi,

Refer to these links. This gave an explanation of why certain fields it allows more than max length.

https://hi.service-now.com/kb_view.do?sysparm_article=KB0685779

https://www.servicenowguru.com/scripting/client-scripts-scripting/maximum-length-large-string-fields...

If you want to override this behavior, then you shall go with client scripts and restrict input after specified no. of chars.

Mark the comment as a correct answer and helpful if it answers your question.

View solution in original post

5 REPLIES 5

Hi,

Refer to these links. This gave an explanation of why certain fields it allows more than max length.

https://hi.service-now.com/kb_view.do?sysparm_article=KB0685779

https://www.servicenowguru.com/scripting/client-scripts-scripting/maximum-length-large-string-fields...

If you want to override this behavior, then you shall go with client scripts and restrict input after specified no. of chars.

Mark the comment as a correct answer and helpful if it answers your question.