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
Data query + User Interface Designer
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
Alanna
Past 24 Hours:
0
Prev. 24 Hours:
0
Overall:
5294
People Online:
Visitors:
451
Members:
0
Total:
451
Online Now:
New Topics
Lawson Portal
Lawson ESS customization
6/23/2025 10:28 AM
I want to add new links and customize the ESS (sel
S3 Security
Securing forms and programs that use Company Group
6/17/2025 5:41 PM
Is there a way to write a rule, that looks up a co
S3 Customization/Development
Self-Serve Customization and Modification of home page
6/17/2025 3:40 PM
Hi, I want to add new links and customize the E
S3 Customization/Development
Data / List view on Lawson Portal
5/21/2025 2:37 AM
Client is on S3 V10. All delivered and custom form
Lawson S3 Financials
Applying credits to open AP invoices
4/28/2025 1:26 PM
Hello, I am new to the Lawson system and after ru
Lawson S3 Financials
Lawson APIA
4/28/2025 1:22 PM
Has anybody recently installed Lawson's APIA m
Lawson S3 Procurement
Tolerance Settings
3/31/2025 2:01 PM
I've been trying to set a tolerance for some t
Dealing with Lawson / Infor
Printing Solutions other than MHC
3/27/2025 1:00 PM
What are others using for printing solutions besid
Lawson S3 Procurement
Green check marks in Lawson 9.0.1
3/20/2025 4:55 PM
Hi, How to remove green check mark on items when o
Lawson S3 HR/Payroll/Benefits
Pay Rate History to Show All Positions
2/26/2025 3:34 PM
Does anyone know how to modify payratehistory.htm
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
JonA
3291
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1377
Roger French
1315
mark.cook
1244
Forums
Filtered Topics
Unanswered
Unresolved
Announcements
Active Topics
Most Liked
Most Replies
Search Forums
Search
Advanced Search
Topics
Posts
Prev
Next
Forums
User Experience
Lawson Design Studio
Data query + User Interface Designer
Please
login
to post a reply.
24 Replies
0
Subscribed to this topic
12 Subscribed to this forum
Sort:
Oldest First
Most Recent First
Author
Messages
khart
Advanced Member
Posts: 25
3/2/2011 7:32 PM
Is there a way to use the portal page designer and the formlet function in that toolbox to map data? I have a Lawson form built then brought it onto the portal page designer using the formlet function but I can not get those two pieces to "talk" together...has anyone done this before? My data query returns rows of data so when I click on a row or click on the check box I would like it to be mapped to the Lawson form. I can gather all the data into variables from the row click but I can not pass it to the formlet.
David Williams
Veteran Member
Posts: 1127
3/2/2011 7:42 PM
Split
Yes, you can map data from a DME to your formlet. Shoot me an email and I'll put together some screen shots for you.
khart
Advanced Member
Posts: 25
3/2/2011 8:20 PM
Split
Thanks, email sent.
SusanB
New Member
Posts: 4
3/28/2011 1:56 PM
Split
I'm trying to do this same thing with no luck. I was wondering if you'd be willing to share the same screen shots with me. I have modified a portal page to include a formlet displaying company # and deposit date. The portal page has a header and detail section plus the formlet. Company comes from the detail query and deposit date from the header query. The formlet deposit date field will allow the user to modify the deposit date. I'm not able to populate the formlet. I don't know how to capture that data. I would really appreciate any guidance you have to offer.
Thank you!
Scooter
Veteran Member
Posts: 83
4/10/2012 3:16 PM
Split
David, could you share the screenprints to me? It could be useful to resolve another issue that I submitted to this forum today?
David Williams
Veteran Member
Posts: 1127
4/10/2012 3:33 PM
Split
Shoot me an email to David@ConsultDavidW.com or david.williams@bailsllc.com and I'll send you the documentation sometime today.
Demi
Veteran Member
Posts: 67
9/21/2012 7:56 PM
Split
I too, would be interested in acquiring some doc. on this; if you would be willing to share it further. I am at
demichener@co.bucks.pa.us
.
Deleted User
New Member
Posts: 0
10/29/2012 5:28 PM
Split
Hi David.
I am also interested in the solution! I just sent you an email.. Thanks for your help!
heidi
Basic Member
Posts: 12
11/30/2012 2:50 PM
Split
Hello, David,
Might I request a copy of the documentation you have provided for DME/query in Lawson Design Studio User Interface?
I am new to the product, so any help would be cheerfully appreciated.
One of my first efforts in LDS involves a need to retrieve related dataset and display on form or in a message box.
My email address is: hsimon@meridianhealth.com
Regards,
Heidi
David Williams
Veteran Member
Posts: 1127
11/30/2012 3:18 PM
Split
Heidi - I just emailed you a document with examples of how to use JavaScript to perform a DME call.
heidi
Basic Member
Posts: 12
12/10/2012 1:17 PM
Split
Thank you very much for the information, David. It is very much appreciated.
New to Design Studio, I am trying to get my first DME call function to work.
So far, unsuccessful . . .
Below is a modification of a function that appeared in the Lawson DS document, "Add data query results to a form". I can not save it, as the system indicates that there is an issue in the line where the results are parsed ("length -1") The line appears to be the same as what was in the documentation.
Any help/direction would be cheerfully accepted.
Heidi
function BUTTON_OnClick(id, row)
{
if (id == "push3")
{
alert("New Button Pressed");
var sVendor = lawForm.getDataValue("MRH-VENDOR");
alert(sVendor);
//Do DME Call
var s = DMEPath+"?PROD=";
s += top.lawsonPortal.getUserVariable("PRODLINE");
s += "&FILE=APVENMAST";
s += "&FIELD=VENDOR_STATUS"
s += "&SELECT=VENDOR=" + sVendor;
s += "&OUT=CSV&DELIM=~&NOHEADER"
alert(s);
var sReturn = top.httpRequest(s);
lawForm.setFormValue("text52","");
if (!sReturn || sReturn.status > 400 )
return;
sReturn = sReturn.replace(/\r/g."");
aRecs = sReturn.split("\n");
aRecs.pop();
aRecFields = aRecs[aRecs.length -1].split("~");
if (ARecFields[0] != "")
lawForm.setFormValue("text52",aRecFields[0];
}
return true;
}
heidi
Basic Member
Posts: 12
12/10/2012 1:25 PM
Split
Oh, the error received is "Expected Identifier".
David Williams
Veteran Member
Posts: 1127
12/10/2012 1:26 PM
Split
The script sample you are looking at is for version 8.03 of Design Studio. The docs I sent you should have the v9 syntax.
heidi
Basic Member
Posts: 12
12/10/2012 1:58 PM
Split
Thank you for clarifying! I was getting quite confused with the approaches taken in the different documents. A variation of the v9 syntax example is shown below. This time, the script was able to be saved. However, this time, when testing the form, a message "Servlet Xpress reported: Missing required parameter: _TKN" appears. Any ideas what caused this message to be produced?
function BUTTON_OnClick(id, row)
{
if (id == "push3")
{
alert("New Button Pressed");
var sVendorGroup = "VND1";
var sVendor = lawForm.getDataValue("MRH-VENDOR");
alert(sVendor);
//Do DME Call
var vProd = portalWnd.oUserProfile.getAttribute("productline");
var DmeString = "?PROD=" + vProd + "&FILE=APVENMAST"+ "&FIELD=VENDOR_STATUS;&SELECT=VENDOR^%3D" + sVendor + "&XCOLS=TRUE&XKEYS=TRUE&XRELS=TRUE&XCOUNT=TRUE&XIDA=TRUE&OUT=XML"
var vDMEInfo = portalWnd.httpRequest(portalWnd.DMEPath + vDmeString)
var vObjDMEXML = new top.DataStorage(vDMEInfo)
var vRecords = vObjDMEXML.document.getElementsByTagName("RECORD");
var numRec= vRecords.Length;
if(numRec!=0)
{
varAlert = ""
for (i=0;i
{
var vCols = vRecords
.getElementsByTagName("COL");
var vVenStatus = vCols[0].firstChild.data;
vAlert += "Vendor Status: " +vVenStatus + "\n"
}
alert(vAlert)
}
}
return true;
}
David Williams
Veteran Member
Posts: 1127
12/10/2012 2:17 PM
Split
I usually see that based upon where the return true command is placed in the script. To avoid it I usually just return true when the text field or button is NOT the one I want - so in your example, I would use - if (id!="push3") return true - and then add the code I want in the rest of the function.
heidi
Basic Member
Posts: 12
12/10/2012 2:50 PM
Split
I made the change, however I am still seeing the same error message. Not sure what to try now . . .
New script:
function BUTTON_OnClick(id, row)
{
if (id != "push3") return true;
{
alert("New Button Pressed");
var sVendorGroup = "VND1";
var sVendor = lawForm.getDataValue("MRH-VENDOR");
alert(sVendor);
//Do DME Call
var vProd = portalWnd.oUserProfile.getAttribute("productline");
var DmeString = "?PROD=" + vProd + "&FILE=APVENMAST"+ "&FIELD=VENDOR_STATUS;&SELECT=VENDOR^%3D" + sVendor + "&XCOLS=TRUE&XKEYS=TRUE&XRELS=TRUE&XCOUNT=TRUE&XIDA=TRUE&OUT=XML"
var vDMEInfo = portalWnd.httpRequest(portalWnd.DMEPath + vDmeString)
var vObjDMEXML = new top.DataStorage(vDMEInfo)
var vRecords = vObjDMEXML.document.getElementsByTagName("RECORD");
var numRec= vRecords.Length;
if(numRec!=0)
{
varAlert = ""
for (i=0;i
{
var vCols = vRecords
.getElementsByTagName("COL");
var vVenStatus = vCols[0].firstChild.data;
vAlert += "Vendor Status: " +vVenStatus + "\n"
}
alert(vAlert)
}
}
}
Robert Spurr
Veteran Member
Posts: 130
12/10/2012 5:57 PM
Split
I jumped in late to this conversation but the error message you are getting is the same message you get if you don't link the button to a function.
In the designer:
1) Click on the button
2) Select the actions from the properties
3) Select Function on left
4) paste in "BUTTON_OnClick" without the quotes
Of course if this is not the problem please ignore. Hope This Helps.
Robert
heidi
Basic Member
Posts: 12
12/10/2012 6:14 PM
Split
Thank you, robert. The function is linked to the button. When I click the button, it begins to step through the function. However, it bails out with the "Token" required message.
Are you aware of any sample code that I could try in order to obtain a "proof of concept" for accessing a piece of related data not currently on the form, and then displaying the output on the custom form?
Robert Spurr
Veteran Member
Posts: 130
12/10/2012 6:22 PM
Split
If your willing to try, I've included a script I use in IC12.1 to populate some of the cost/qty information on the main form so they don't have to drill. For your test you could probably just convert what I have as text fields to alerts.
Let me know if this helped.
function FORM_OnAfterTransaction(data)
{
var vCompany = lawForm.getDataValue("ITL-COMPANY");
var vLocation = lawForm.getDataValue("ITL-LOCATION");
var vItem = lawForm.getDataValue("ITL-ITEM");
var strPDL = portalWnd.oUserProfile.getAttribute("productline");
//DME call
var s = "?PROD="+strPDL;
s += "&FILE=ITEMLOC";
s += "&INDEX=ITLSET1&KEY=" + vCompany + "=" + vLocation + "=" + vItem;
s += "&FIELD=LAST-REC-COST;LAST-ISS-COST;SOH-QTY;ALLOCATABLE";
s += "&MAX=1&OUT=XML";
//alert(s);
var sReturn = portalWnd.httpRequest(portalWnd.DMEPath + s);
if (!sReturn || sReturn.status)
{
var msg="Error calling DME ";
msg += (sReturn
? "(status code): " + sReturn.status
: "bad server response.");
alert(msg);
return true;
}
var vObjDMEXML = new portalWnd.DataStorage(sReturn);
var vRecord = vObjDMEXML.document.getElementsByTagName("RECORD");
if (vRecord.length == 0)
{
return true;
}
lawForm.setDataValueById("text47","");
lawForm.setDataValueById("text48","");
lawForm.setDataValueById("text49","");
lawForm.setDataValueById("text50","");
vCols = vRecord[0].getElementsByTagName("COL");
lawForm.setFormValue("text47",vCols[2].firstChild.data);
lawForm.setFormValue("text48",vCols[3].firstChild.data);
lawForm.setFormValue("text49",vCols[0].firstChild.data);
lawForm.setFormValue("text50",vCols[1].firstChild.data);
return true;
}
heidi
Basic Member
Posts: 12
12/10/2012 6:32 PM
Split
Robert, Thank you very much! I will give this a shot and let you know how I make out. Your help is really appreciated.
heidi
Basic Member
Posts: 12
12/10/2012 7:05 PM
Split
Robert, Data values were returned!!! This is a break through! Thank you so, so much for your time and attention.
Unbelievably, though, the same error message box still pops up before displaying the information. I don't know how to address this error message. Is there a way to suppress the message, given that the system actually does return results now?
I am thrilled to have finally "made contact" with other Lawson tables accessed from a custom form. It opens up a whole new world.
Again, your help, and that of David Williams, has been invaluable to me. Thank you both! And, thank you Lawson Guru.
Heidi
Robert Spurr
Veteran Member
Posts: 130
12/10/2012 7:23 PM
Split
I beginning to believe this has nothing to do with the DME and more to do with the form. I would start over by deleting your current design studio form and regenerating a fresh copy. Validate it works before entering any scripting or buttons.
Did you try the script I provided on IC12 and that is were you got the error?
heidi
Basic Member
Posts: 12
12/10/2012 7:29 PM
Split
Robert, Yes, I used your script "right out of the box", with exception of calling it from a Button Click, as opposed to the "OnAfterTransaction".
I started with a fresh, new form, as I had not yet done any work on any of the IC12 forms. I added four text boxes that matched where you output the DME values.
Then, a new button was added, to retrieve the data.
Your script worked like a charm!
I am working in our testing environment, where there are multiple productlines. Could the errant message have something to do with that?
Robert Spurr
Veteran Member
Posts: 130
12/10/2012 9:13 PM
Split
I guess it could be. Alert the product line and verify or for testing purposes hard code the product line to test.
heidi
Basic Member
Posts: 12
12/11/2012 2:26 PM
Split
While I don't have a full solution yet to share, it appears that the errant, unnecessary message may be caused by a LID run type "pgmdef" setting. Once the issue is fully resolved, I will post what it took to resolve.
Again, your help and time is appreciated!
Please
login
to post a reply.