length of field

samadam
Kilo Sage

I have a few multiline text fields that show the number of characters. When saved with more than the limit it shows negative values like "-234 chars of 4000 " and able to save the entered value. I am trying to avoid storing more than the character limit. IS this possible? I found a system property to disable the character count but that is affecting the platform as whole. I can use a on submit client script to check and truncate but not sure how to query the table to get max_length of the dictionary field. Any suggestions?

2 REPLIES 2

Joe Wong
Tera Guru

That is a good question.  All I can find is a way to get a XML file of the table schema which will have the information you are looking for.  But then you will need to do some work in terms of parsing the XML to get what you want.

https://instance.service-now.com/table_name.do?SCHEMA


One of the field of each element is "max_length".
Hope this helps.
There might be other better ways to get this information.

ersureshbe
Giga Sage
Giga Sage

Hi,

Can you refer below article may it will support.

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0685779

 

Regards,
Suresh.