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:
Zac Shields
Past 24 Hours:
2
Prev. 24 Hours:
0
Overall:
5210
People Online:
Visitors:
390
Members:
1
Total:
391
Online Now:
THouser
New Topics
Lawson S3 HR/Payroll/Benefits
Post Tax Benefit Plan Table
11/14/2024 9:16 PM
Hi, totally new to Laswon. I have a repor
Lawson S3 Procurement
ED501 Error: Map 850 not supported by /law/c15vda/lawson/test10/edi/bin/laws_out_91
11/12/2024 3:47 PM
Tried runnning ED501 and getting the atathced erro
Lawson S3 HR/Payroll/Benefits
Error
11/6/2024 9:54 PM
When I try to enroll a retiree in 72.1 health plan
Infor ERP (Syteline)
Syteline: New Data Maintenance Wizard (Error) Need help
11/1/2024 4:24 PM
Hi, I need help with an error on syteline while us
Dealing with Lawson / Infor
Implementing Lawson v10 with Cerner Surginet, Case Cart Picking, and Quick Adds for the OR
10/29/2024 4:20 PM
Hi Everyone, I am wondering if there is any org
Lawson S3 HR/Payroll/Benefits
Canada Tax Calculation (Federal and Provincial) Issue
10/23/2024 5:00 AM
Initially, we had problem with CPP2 calculation is
Lawson S3 HR/Payroll/Benefits
CA Section 125 401k Plan
10/22/2024 10:13 PM
Does anyone have any recommendations on how to fac
S3 Systems Administration
Running AC120 deleted records from ACMASTER table
10/22/2024 3:40 PM
We recently ran the AC120 as normal and somehow it
Lawson S3 Procurement
RQ13 Approval Info
10/17/2024 2:12 PM
When a Requisition is approved on RQ13, what table
S3 Customization/Development
Read and Write CSV file COBOL
10/9/2024 2:53 PM
Does anyone have a quik example of a program that
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
1372
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
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
Thanks, email sent.
SusanB
New Member
Posts: 4
3/28/2011 1:56 PM
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
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
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
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
.
Clement
New Member
Posts: 2
10/29/2012 5:28 PM
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
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
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
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
Oh, the error received is "Expected Identifier".
David Williams
Veteran Member
Posts: 1127
12/10/2012 1:26 PM
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
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
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
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
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
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
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
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
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
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
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
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
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.