Characters limit on work notes and additionel comments

sbygel
Tera Contributor

How do I set a character limit e.g. on 1000 characters in the work notes and additionel comments for incidents and requested items, before the See all text appears?

find_real_file.png

 

Currently the limit is well above 40.000 characters (it is possible it' s a size limit and not character limit), which makes it close to impossible to get an overview.

I have tried using this guide, but it did not change anything - https://docs.servicenow.com/bundle/kingston-platform-administration/page/administer/field-administration/concept/c_JournalFieldDisplayLimits.html 

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Sbygel,

If that is not working then why not to use some client script etc to validate the length.

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Not applicable

Hi,

By default, multi-line text fields have a 4000 character limit. To help users see how many characters remain before they reach the limit, administrators can enable theglide.ui.textarea.character_counter property. This property adds a counter under text fields, such as the Additional Comments and Work notes fields. The counter is dynamically updated as users enter text.

you can get the id by right clicking the variable in the form view, and choosing inspect and finding the id='IO ######################' text example below.

<textarea class="question_textarea_input cat_item_option" wrap="soft" id="IO:cfe90c11d57cd200585544e383220bc0" onchange="if (typeof(variableOnChange) == 'function') variableOnChange('IO:cfe90c11d57cd200585544e383220bc0')" name="IO:cfe90c11d57cd200585544e383220bc0" rows="5" maxlength="1050" style="height: 300px; overflow: hidden; word-wrap: break-word; resize: none;"></textarea>

 

Below is the onLoad Client script :

function onLoad() {

 

  //Type appropriate comment here, and begin script below

 

  var i = document.getElementById('element_id'); //variable name

 

  i.maxLength = '1000';

 

}

 

 

Hope this will be helpful

Regards,

Ajay

find_real_file.png

www.DxSherpa.com