How to limit the character count of a variable of a Catalog Item?

Navya43
Tera Contributor

I have a variable 'Comments' in a catalog item. But I want to limit the characters a user can input.

How can I achieve it? 'Comments' is already a Single Text Line type, but I need to limit the characters further more.

Please help!

1 ACCEPTED SOLUTION

@Navya 

Glad to know that my approach worked.

Please mark my response as correct and close the thread.

Regards
Ankur

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

View solution in original post

7 REPLIES 7

For that you would require script

Script for setting character limit on multi-line text field

Regards
Ankur

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

Community Alums
Not applicable

Hi Navya,

You can use this code for your requirement :

https://community.servicenow.com/community?id=community_question&sys_id=69283680dbb05748852c7a9e0f96...

Mark my answer correct & Helpful, if Applicable.

Thanks,
Sandeep

Thanks for the solution! Could you also please tell how to limit characters on Multi Line Text variable?