Character limit is 1000 but still allowing more characters
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 02:54 AM
Hi All,
We have one text field 'Description ' in cmdb_ci_ip_address table but its allowing more characters in that field when CIs created through discovery.
Can you please help how to avoid it.
Thanks
Roopa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 03:01 AM
Hi @Roopa11 ,
Write a Before /Update Business rule on cmdb_ci_ip_address table.
if(current.description.length > 100){
current.setAbortAction(true);
}
Or trim the Description to 100 Characters only.
If the above information helps you, Kindly mark it as Helpful and Accept the solution.
Regards,
Najmuddin.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 03:12 AM
Hi, it is a known behavior of ServiceNow that a field stores up to 4000 characters if the max length of the field is set to something greater than 255.
This is based on the database architecture, see this support article for more details: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0685779
So for your case you could trim the input using a Business Rule like so:
current.description = current.description.substring(0, 1000);