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

Please keep it simple when you are learning   Try this code first, If it works then you expand code.



Just add a single function in your script include.



maintest: function() {


      gs.log("Inside maintest function of Script include");


      return "my response";


},



Thanks


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


BALAJI40
Mega Sage

This can be in the script include function, gs.log('I am running '+ this._gettest('da','Hello Sir'));



you can write after the script include function exclusively,


_gettest: function (target,query) {


  gs.log(target + query);


}



try with this.