Forums
Lawson Design Studio
link WFMATRICS to portal page
Author
Messages
Rajeev
Basic Member
Posts: 5
10/23/2013 5:07 PM
In my portal page I have two objects, data query and a formlet with custom pa42.1 My dme query queries the WFMATRICS-table and display job requisitions approved by a user currently logged in, Then I click on a row and capture the key-string(company requisition#) in the variables. Var1=company and Var2=requisition# How do I link these variables to formlet so it can automatically populate custom pa42.1
Terry P
Veteran Member
Posts: 234
10/23/2013 5:25 PM
You have to click on the "Custom" option of the PortalPage. Then map them.
Terry P
Veteran Member
Posts: 234
10/23/2013 5:26 PM
David Williams
Veteran Member
Posts: 1127
10/23/2013 5:37 PM
Try something like this:
var FormObj = window.frames["PO23.1_CUSTOM"];
//set the values to the form
FormObj.lawForm.setDataValue("FIL-SOURCE-DOC",vReqNum);
//do an inquire although it may already once the keys are supplied
FormObj.lawformDoFunction("I");
Rajeev
Basic Member
Posts: 5
10/28/2013 3:04 PM
Thanks for the reply guys, appreciated! I was away for two days so didn't get back to you earlier.
Here is my function that I have in my portal page, for some reason its not passing the values to the form when I click on the row. The last line(DoFunction) works, I do see a message ”Field Required”.
function data0_OnRowClick()
{
var oDME = page.objects["data0"]
var rowRecordAry = oDME.getRowRecord()
var oField = rowRecordAry[5]
var fieldValue = oField.value.replace(/ /g,"")
var vRequisition = fieldValue.substring(4,15);
var vCompany=0001;
//alert (vRequisition);
//var vHK="0001"+vRequisition;
// var sURL=portalObj.path+"?_TKN=PA42.1&_HK="+vHK
// window.open(sURL);
var FormObj = window.frames["PA42.1_MYREQ"];
//set the values to the form
FormObj.lawForm.setDataValue("PJR-COMPANY",vCompany);
FormObj.lawForm.setDataValue("PJR-REQUISITION",vRequisition);
FormObj.lawformDoFunction("I");
}
Rajeev
Basic Member
Posts: 5
11/1/2013 12:27 PM
It worked after i changed setDataValue to setFormValue.
Thanks for you the help - appreciated.