Variable set on change not working

Amit_H
Tera Contributor

I am trying to set a field mandatory when requested_for get changed but its not working, I have written onchange client script. Actually my script is not getting called, i tried print alert but didnt work. what could be the reason?

2 ACCEPTED SOLUTIONS

Runjay Patel
Giga Sage

Hi @Amit_H ,

 

I think you are writing client script on catalog item, go variable set and there write your client script.

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

View solution in original post

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Amit_H 

 

You can use UI policy which is low code.

*************************************************************************************************************
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

5 REPLIES 5

Runjay Patel
Giga Sage

Hi @Amit_H ,

 

I think you are writing client script on catalog item, go variable set and there write your client script.

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Amit_H 

 

You can use UI policy which is low code.

*************************************************************************************************************
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]

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

Aniket Chavan
Tera Sage
Tera Sage

Hello @Amit_H ,

 

Could you please share some screenshots of your client script configurations? This will help us better understand your setup and provide more accurate guidance.

Ankur Bawiskar
Tera Patron
Tera Patron

@Amit_H 

please share your client script configuration screenshot, variable set screenshot and that requested_for variable screenshot.

Also is it single row variable set or MRVS

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