How to set the 2000 as max Character length to Justification field in change form in service now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-04-2022 11:01 PM - edited ‎12-04-2022 11:03 PM
I have a requirement to set a Justification field from change form with max Character limit of 2000. here I was facing a problem. initially it was set to 4000 characters length If I change it to 2000 It was troughing an error like there are certain N number of records which has more than 2000 no of characters.
The Major challenge is when I go and check the variable in config dictionary max length is set to be 4000 but as a string variable It should need to limit to 4000 characters only, but it was taking without a limit as shown in the image
Justification field in the image
Config dictionary
there are no dictionary overrides also but still it is accepting a more than the condition.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-04-2022 11:05 PM - edited ‎12-04-2022 11:05 PM
Hello Srikanth,
Here is the official response why this is expected behavior:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0685779#:~:text=Any%20string%....
And here is the workaround for that.
https://www.servicenow.com/community/developer-forum/how-to-restrict-character-limit-of-a-string-fie...
You can mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!
Best Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2022 03:39 AM
@Srikanth Vadlam
Did the above work for you?
You can mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!
Best Regards