How to check character limit on Translated HTML fields

tj2
Kilo Contributor

Hi,

I want to add a check on the Knowledge form,Text field (type : Translated HTML) - If you type in more than 65,000 chars then want to alert that "Char limit exceed"
How can i achieve this?
Another thing which I am not clear is on Text field on Knowledge form if we add more than 65,000 chars(max length) it does not truncate the extra chars,rather it allows to save the entire content - how is this possible, whereas on string field with max length as 4000 , it does truncate if more than 4000 chars are added.

Thanks

3 REPLIES 3

Mark Stanger
Giga Sage

This should help you to understand.

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


tj2
Kilo Contributor

Thanks for the link Mark, but the script does not seem to work for Translated HTML type fields, can you please suggest any workaround for char limit check on Translated HTML type fields

Thanks


There's not a great way to do that for html fields because it's a framed object and it also includes all of the back-end code that would count as characters, confusing the user. The point of the article is that it really doesn't matter anyway (at least to the database). If it's really a concern, then you'll probably need to use a standard string field where you can limit the input using a script.