Validate Regex in Client Script that calls function from Script Include.

Chronos
Tera Contributor

Hi,

I have created a Client Script to validate input information. But I would like to be able to put a Regular expression in a Script Include so that I can call the function and use it in the Client.
Does anyone know how to do it and guide me.

Thanks,

 

Chronos_0-1678366984796.png

 

3 REPLIES 3

Hemant Goldar
Mega Sage
Mega Sage

Hi @Chronos,

 

I found one community post which has a similar question

https://www.servicenow.com/community/developer-forum/using-regular-expression-in-catalog-client-scri... 

 

I hope this helps!

 

Regards,

Hemant 

**Please mark my answer correct or helpful based on the impact**

Hi, @Hemant Goldar 

Maybe you misunderstood my problem, I made it in Client Script and now want to convert it into Script Include and call the function in Client again.

Hi @Chronos ,

 

Then you can simply call it as we call script include using GlideAjax syntax and pass the required parameter if any.

Example :GlideAJAX that can be used by client scripts and replace existing use of GlideRecord from Client scr... 


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy