- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2020 02:54 PM
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
Solved! Go to Solution.
- Labels:
-
Facilities Service Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2020 04:25 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2020 03:13 PM
Is there any specific reason you have two different functions to call in a single reference qualifier? If those functions are being used separately in some scripts then I would suggest creating a third function and calling both inside that process and return required result and call the third function inside the reference qualifier.
However, I think you can call two different functions in SI like this.
javascript: var SI = new SeatUtils(); SI.getbcp3()+"^"+ SI.getbcp2();
Before executing place logs inside both the functions and see if logs are generated. I am not sure if the returned output will make sense or not following this way.
Thanks & Regards,
Sharjeel
Muhammad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2020 10:30 PM
tried with this..
but its not working.
Also tried calling the third function
getbcp3: function() {
var locationList = [];
var location = new GlideRecord('fpv_element');
location.addQuery('sys_id','fbac3ccfdbfd9c507b06d776489619ff');
location.query();
while(location.next())
{
locationList.push(location.sys_id.toString());
}
return 'sys_idIN'+locationList;
},
getbcp2: function() {
var locationList1 = [];
var location1 = new GlideRecord('fpv_element');
location1.addQuery('sys_id','005e1b861ba07f845c407661cd4bcb57');
location1.query();
while(location1.next())
{
locationList1.push(location1.sys_id.toString());
}
return 'sys_idIN'+locationList1;
},
getbcp1: function() {
var isValidFunction = getbcp1() && getbcp();
return isValidFunction;
},
its also not working

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2020 06:01 PM
Hello,
see this thread having same requirement but I think you need to add some spaces in between functions
Check below script,
If answer is helpful please mark correct!
Thanks,
Pratiksha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2020 10:31 PM
tried with adding space but not working