How to limit single line text variable on Record Producer to max length as user type in the value

KeDix
Tera Expert

How to limit single line text variable on Record Producer to max length as user type in the value.

It can be done on OnChange but, the issue with that is it works only when the focus is moved out from the field/variable.

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@KeDix User max_attribute variable attribute as follows.

 

Screenshot 2023-09-26 at 4.58.13 PM.png

 

Screenshot 2023-09-26 at 4.56.30 PM.png

It does not require any regular expression or scripting. For more information on variable attributes please refer to 

https://docs.servicenow.com/bundle/utah-servicenow-platform/page/product/service-catalog-management/...

View solution in original post

8 REPLIES 8

Alex Tod1
Kilo Sage

Hello @KeDix,

  I leave you a kb article here, maybe it's useful for you: 

  https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0718701

Regards
Alex

 

@Alex Tod1 

I went through the article but do not understand where to mention 'max_length=150'

Please refer to my reply where I have mentioned how you can use max_length attibute.