Is it possible to use g_form in oncell edit client scripts

MaharshiC
Tera Contributor

Hi,

 

Is it possible to use g_form for oncell edit client scripts? If it is not possible how to check for values in other fields for the request using oncelledit?

 

 

10 REPLIES 10

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @MaharshiC 

 

oncell edit only works on the list view, mate. You’ll need to apply validation to the other fields."

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

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

Hi @Dr Atul G- LNG ,

 

Thank you  for your answer. How do we do validation in that case . can we do through the celledit client script ?

Hi @MaharshiC 

 

Are you referring to validation on one field or multiple fields? If it's just one field, then oncell edit is available. However, if it's for other fields, you can follow Ankur’s suggestion using g_scratchpad."

https://youtu.be/TgZbATLoS04

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

****************************************************************************************************************
Disclaimer: These videos did not promote any ServiceNow Sales pitch or marketing. These videos are only for knowledge purposes & basic on my experience & Knowledge. LinkedIn:https://www.linkedin.com/in/atulgroverservicenowconsultant Redistribution or copying of functionality is not allowed!

Samrudhi Pandi1
Tera Contributor

It is not possible to use g_form in onCellEdit client scripts since it works on the list view.

However you can make a server-side call using script include and GlideRecord or g_scratchpad to check other field values.