Characters limit on work notes and additionel comments
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2018 02:01 PM
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?
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
- 5,614 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2018 11:23 PM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2018 11:34 PM
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