Client Scripts

Ashok  kumar
Tera Contributor

HI , I have one requirement . can anyone please help , Thanks in advance 

  I have a field named  short_description and description

 . write a client script to limit short description field to 30 characters , description field to 70 characters in the incident form 

2 ACCEPTED SOLUTIONS

Your error message already gives you the cause of the error: you have existing records that have data in them that exceeds the new length.

Personally, I'm more curious about why you want to limit (especially the description field) to such a length? You will have a lot of complaints about people being unable to fill in the data they need (let alone integrations and such). 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

View solution in original post

Dr Atul G- LNG
Tera Patron
Tera Patron

We can use client script, but why you write a code mate, when it can be achived OOTB.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

7 REPLIES 7

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Ashok kumar 

 

You can use like this

LearnNGrowAtul_0-1705580876883.png

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ashok  kumar
Tera Contributor

Hi @Dr Atul G- LNG  when I am trying to do like snap u have sent , I am getting error .please check the screenshotScreenshot (40).png

Your error message already gives you the cause of the error: you have existing records that have data in them that exceeds the new length.

Personally, I'm more curious about why you want to limit (especially the description field) to such a length? You will have a lot of complaints about people being unable to fill in the data they need (let alone integrations and such). 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Yes mate, it means the requirement is fulfil. This error means your record are exceeding the character limit. 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************