I'm trying to add a field (EMS-DESCRIPTION) to this DME query in my form, but I get an error when I run it:
function doDME() { var sDME; var vCompany = 1; var vEmployee = lawForm.getFormValue("txtemployee"); sDME ="?PROD=" + strPDL; sDME +="&FILE=EMPLOYEE&FIELD=FICA-NBR-LAST4;FULL-NAME;EMS-DESCRIPTION;EMP-STATUS;HM-ACCT-UNIT;LOCATION.CODE;LOCATION.DESCRIPTION;COMPANY;EMPLOYEE"; sDME +="&SELECT=COMPANY%3D" + vCompany; sDME +="%26EMPLOYEE%3D" + vEmployee; sDME +="&OUT=XML"; //alert(sDME); var vDMEInfo = top.httpRequest(top.DMEPath + sDME); var vObjDMEXML = new top.DataStorage(vDMEInfo); var vRecords = vObjDMEXML.document.getElementsByTagName("RECORD"); if (vRecords.length == 0) { alert("Employee Not Found!"); return true; } var vCols = vRecords[0].getElementsByTagName("COL") lawForm.setFormValue("txtficanbr",vCols[0].firstChild.data); lawForm.setFormValue("txtfullname",vCols[1].firstChild.data); lawForm.setFormValue("txtstatus",vCols[2].firstChild.data); lawForm.setFormValue("txtacctunit",vCols[3].firstChild.data); lawForm.setFormValue("txtlocationcode",vCols[4].firstChild.data); lawForm.setFormValue("txtlocationdesc",vCols[5].firstChild.data); lawForm.setFormValue("txtstatdesc",vCols[6].firstChild.data); return true; }
Any ideas why?
Thanks
sDME +="&FILE=EMPLOYEE&FIELD=...