Focal Point
[CLOSED]Appstudio

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9947082386

August 02, 2016, 05:07 PM
Tarun Kumar
[CLOSED]Appstudio
Can any one post sample code block in appstudio which calls an external API

WF 8.1.03
APPSTUDIO 8.103
Linux

This message has been edited. Last edited by: <Emily McAllister>,


Webfocus 8 Linux
August 03, 2016, 03:03 AM
Neelima
quote:
Can any one post sample code block in appstudio which calls an external API

do you want to add external JS and CSS file?


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
August 03, 2016, 07:26 AM
GavinL
quote:
Can any one post sample code block in appstudio which calls an external API


What do you mean by External API? Calling a Web/Rest Service?



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
August 03, 2016, 11:00 AM
Barry Solomon
HI

var jobcode = document.getElementById('listbox8').value;
var yearmonth = y+'/'+m+'/01';
var hiredate = IbComposer_getCurrentSelection('calendar1');
var termdate = IbComposer_getCurrentSelection('calendar2');
if (termdate == 'FOC_NOSELECTION' ){termdate = '9999-12-31';}
var getRandomNum = Math.random();


var url = "http://" + window.location.hostname + "/ibi_apps/WFServlet" + "?";
url = url + "IBIF_ex=pbj/addhours_v2.fex" + "&" + "VendorID=" + vender + "&" + "EmployeeID=" + emp + "&" + "FacilityCode=" + facility;
url = url + "&" + "yearmonth=" + yearmonth + "&" + "updString=" + updString + "&" + "HireDate=" + hiredate + "&" + "TermDate=" + termdate;
url = url + "&" + "tamp=" + getRandomNum + "&" + "JobCode=" + jobcode + "&" + "EmployeeCompType=" + empcompstatus;
alert(url);
xmlHttp.open("GET", url, true);
xmlHttp.send(null);
}
Hope this helps


WebFOCUS 8
Windows, All Outputs