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

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

in the variable attributes of that variable you can add this

For example: max length as 40

max_length=40

How to set the maximum character length for variable of single-line text or wide single line-text in...

regards
Ankur

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

@Navya 

Hope you are doing good.

Did my reply answer your question?

If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.

Regards
Ankur

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

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

@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