Login
Register
Search
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Forums
User Experience
Lawson Design Studio
Add values to listbox from dme query
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
Jeffin Joy
Past 24 Hours:
1
Prev. 24 Hours:
0
Overall:
4988
People Online:
Visitors:
73
Members:
0
Total:
73
Online Now:
New Topics
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1377
Roger French
1315
mark.cook
1244
Chris Martin
825
Forums
Filtered Topics
Unanswered
Unresolved
Active Topics
Most Liked
Most Replies
Search Forums
Advanced Search
Prev
Next
Forums
User Experience
Lawson Design Studio
Add values to listbox from dme query
Please
login
to post a reply.
2 Replies
0
Subscribed to this topic
13 Subscribed to this forum
Sort:
Oldest First
Most Recent First
Author
Messages
George Graham
Veteran Member
Posts: 201
6/27/2011 12:15 PM
Looking for the java syntax to add values to a list box on form init from the results of a DME query. This isn't a field from the form so can't simply attach that to the object.
I just can't find my notes on how to add the text, phrase and values to the object.
George Graham
Veteran Member
Posts: 201
6/27/2011 12:34 PM
Split
Never mind - found it.
Ragu Raghavan
Veteran Member
Posts: 477
New Poster
Congrats on posting!
Engaged Poster
Wow, you're on a roll!
Avid Poster
Seriously, you're a posting maniac!
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader art thou!
6/27/2011 12:35 PM
Split
Code below does a DME query on APINVOICE and populates list box l70 with all the Invoices for the specified Vendor
var s = portalWnd.DMEPath;
s += "?PROD=" + sPDL;
s += "&FILE=APINVOICE";
s += "&FIELD=INVOICE;INVOICE-DTE;";
s += "&INDEX=APISET1";
s += "&KEY=" + vCompany + "=" + vVendor;
s += "&OUT=XML";
// alert("s " + s);
var sReturn=portalWnd.httpRequest(s);
if (!sReturn || sReturn.status)
{
alert("status s " + sReturn.status);
return true;
}
var vObjXML = new portalWnd.DataStorage(sReturn);
var vRecords = vObjXML.document.getElementsByTagName("RECORD");
// alert("vrecords " + vRecords.length + " " + vRecords.text);
//_l70 is the listbox
var InvList = document.getElementById("VALUES_l70");
// alert(vCols[0].firstChild.data + " " + vCols[1].firstChild.data);
for (var ix=0; ix < vRecords.length - 1 ; ix++)
{
var vCols = vRecords[ix].getElementsByTagName("COL");
var str1 = vCols[0].firstChild.data;
var str2 = vCols[1].firstChild.data;
// alert("str2 " + str2);
var str3 = str1 + " " + str2;
ListVal = document.createElement("span");
ListVal.setAttribute("tran",str1);
ListVal.setAttribute("disp",str1);
ListVal.setAttribute("text",str3);
InvList.appendChild(ListVal);
}
Please
login
to post a reply.