Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Function within Script Include is not working

Satpal Singh1
Kilo Contributor

Hello All,

I know this is very simple code in server side script but why it is not working I am very amaze.. .

gs.print('I am running '+ this._gettest('da','Hello Sir'));

function _gettest(target,query) {

  gs.print(target + query);

}

Thanks all !!

Regards,

SS

11 REPLIES 11

sergiu_panaite
ServiceNow Employee
ServiceNow Employee

How do you know it's not working?



Maybe replacing gs.print with gs.log will show it's working? gs.print only prints in localhost_log while gs.log adds a row in syslog table as well.


Alikutty A
Tera Sage

How are you calling it? You have created it as a private function.




Thanks


Please Hit like, Helpful or Correct depending on the impact of the response.


Thanks for your response. I tried with gs.log and checked in system logs but not helping.


How do you call the script include? From where?