how to add two functions from script include in a reference qualifier

akhila13
Tera Expert

how to add two functions from script include in a reference qualifier

 

SeatUtils is the script include and  getbcp3() is a function. i have another function getbcp2()

 

have to call both in single reference qualifier

 

tried javascript:new SeatUtils().getbcp3()+new SeatUtils().getbcp2(); but not working fine

 

find_real_file.png

1 ACCEPTED SOLUTION

Harsh Vardhan
Giga Patron

use this to call function inside script include 

eg this.functionName() 

I have two function and want to merger both result into third function it will be used like below. 

 

get1: function(){

 

return 'hello';

},

get2: function(){

 

return 'harsh';

}

 

final: function(){

 

return this.get1()+','+this.get2();

 

}

 

If my answer helped you, kindly mark it as correct and helpful.

View solution in original post

12 REPLIES 12

Dhananjay Pawar
Kilo Sage

Hi,

Is it working with single function?

yes... when we call both as single function its working

Hi,

Then your reference qualifier should work.

Try adding scope before script include name.

javascript: new global.SeatUtils().getbcp3() + new global.SeatUtils().getbcp2();

Note - Replace global with your scope name and try.

Swapnil Soni1
Giga Guru

Hi,

  • Check that the script include is available to all scopes (it's in the upper right of the form)
  • address your script include with the scope name prefix. E.g. javascript:new myscope.myScriptInclude().myFunction()

 

Let me know if this helps.

Thanks

  • i have changed the application scope.. Still it not working