Register
Login
 
  Search  
Site Map
 
HomeAppsS3 AppsS3 FinancialsS3 HR/PayrollS3 Supply ChainS3 ProcurementM3 AppsEnterprise Asset Management Manufacturing OperationsFinancialsBPM/EPM/LBIDesign StudioEnterprise Reporting (Crystal)Microsoft Add-InsProcessFlow / BCISmart NotificationTechDatabase ERDsData DictionaryApplication SecurityDevelopmentLawson 4GL Quick ReferenceDesign StudioDatabaseDB2OracleSQL ServerEnvironmentiSeriesUnixAIXWindowsLogan/IOSLSF 9M3 System Foundation PortalERDsDocumentationTips & TricksForumsJobsLawsonGuruLawsonGuru LetterLawsonGuru BlogWorthwhile ReadingLawson in the NewsUser RegistrationStoreStore AdminMy PurchasesStore FAQsSearchEngage Publish Search IndexerSearch ResultsSearch TipsArticle ViewerJohnContentUser ManagerBackupsVenexusVenexus Web ControlsMonitorAboutAdminSite SettingsTabsSecurity RolesUser AccountsVendorsSite LogBulk EmailFile ManagerRecycle BinLog ViewerSkinsLanguagesSite WizardAuthenticationSolutionsPageBlasterWhat's New
Top 10 Posters
 
Share:email email|delicious.com delicious.com|digg digg|technorati technorati|reddit reddit|stumbleupon stumbleupon|google bookmarks google bookmarks|yahoo bookmarks yahoo bookmarks|slashdot slashdot|live live|ma.gnolia ma.gnolia
Tips on Using the LawsonGuru ForumsMaximize

LawsonGuru ForumsMinimize
Subject: Form won't load new data on initial INQ
Prev Next
To join the discussion you need to register first. (Registration is free!) If you are already a registered user please login to join the discussion. 

AuthorMessages
wilcoxmadUser is Offline
Frequent Member
Posts:21

7/24/2008 6:59 PM  

I created a new HR11 screen to display the Job Class and its description, on the 2nd tab. The first time the program is initialized, these new fields don't get filled out. On any subsequent trans they work fine. Any suggestions?

 

John HenleyUser is Offline
Super Member!
Posts:1235

7/25/2008 7:44 AM  

How are you loading the fields? Are you using JavaScript?


Thanks for using the LawsonGuru.com forums!

John
wilcoxmadUser is Offline
Frequent Member
Posts:21

7/25/2008 12:43 PM  

function FORM_OnAfterTransaction(data)
{
 //was transaction successful?
 if (formState.agsError) return;
 
 var vCompany=lawForm.getFormValue("text1");
 var vJobCode=lawForm.getDataValue("EMP-JOB-CODE");

 // blank out jobclass and desc fields.
 lawForm.setFormValue("text165","");
 lawForm.setFormValue("text166","");

 //Find the jobcode record 
 dmeStr = "?XCOLS=TRUE&XKEYS=TRUE&XCOUNT=TRUE" +
 "&XRELS=FALSE&XIDA=FALSE&XNEXT=FALSE" +
 "&PROD=" + portalObj.getUserVariable("PRODLINE") +
 "&FILE=JOBCODE" +
 "&FIELD=JOB-CLASS" +
 "&INDEX=JBCSET1" +
 "&KEY=" + vCompany + "=" + vJobCode +
 "&OUT=XML";

  var vDMEInfo = top.httpRequest(top.DMEPath + dmeStr);

 //Set the DME result data to an XML object to parse through.
 var DMEobj = new top.DataStorage(vDMEInfo);
 var vRecords = DMEobj.document.getElementsByTagName("RECORD");
 if (vRecords.length == 0)
 {
  alert("No JOBCODE record found.");
  return true;
 }
 else
 {
 // alert("JOBCODE record found.");
  var vCols = vRecordsΎ].getElementsByTagName("COL");
  //get jobclass from XML object.
  vJobCls = vColsΎ].firstChild.data;
  lawForm.setFormValue("text165",vJobCls); 
 }


 //Find the jobclass record
 dmeStr = "?XCOLS=TRUE&XKEYS=TRUE&XCOUNT=TRUE" +
 "&XRELS=FALSE&XIDA=FALSE&XNEXT=FALSE" +
 "&PROD=" + portalObj.getUserVariable("PRODLINE") +
 "&FILE=JOBCLASS" +
 "&FIELD=DESCRIPTION" +
 "&INDEX=JCLSET1" +
 "&KEY=" + vCompany + "=" + vJobCls +
 "&OUT=XML";

 var vDMEInfo = top.httpRequest(top.DMEPath + dmeStr);

 //Set the DME result data to an XML object to parse through.
 var DMEobj = new top.DataStorage(vDMEInfo);
 var vRecords = DMEobj.document.getElementsByTagName("RECORD");

 if (vRecords.length == 0)
 {
  alert("No JOBCODE record found.");
  return true;
 }
 else
 {
 // alert("JOBCLASS record found.");
  var vCols = vRecordsΎ].getElementsByTagName("COL");
  //get jobclass from XML object.
  vJobClsDesc = vColsΎ].firstChild.data; 
  lawForm.setFormValue("text166",vJobClsDesc);
  return true;
 }
}

John HenleyUser is Offline
Super Member!
Posts:1235

7/25/2008 2:52 PM  
I will go out on a limb and say that the reason it might not be working on the first inquire is because: 1) you're using FORM_OnAfterTransaction() event 2) you're using lawForm.getFormValue("text1") to get the COMPANY for your lookups My understanding of FORM_OnAfterTransaction is that it fires AFTER the AGS transaction has executed, but BEFORE the form fields/HTML elements are populated with the results of the AGS transaction. So, in other words, lawForm.getDataValue() will have AGS-supplied values, but lawForm.getFormValue() won't. Just a hunch. So, try changing: var vCompany=lawForm.getFormValue("text1"); To var vCompany=lawForm.getFormValue("EMP-COMPANY");

Thanks for using the LawsonGuru.com forums!

John
wilcoxmadUser is Offline
Frequent Member
Posts:21

7/25/2008 3:00 PM  

I'll try that but I do know that both values load correctly, I displayed the results during my testing to be sure! Company is of course a required field, so I didn't have to rely on the resulting load of data, the user must enter it.

wilcoxmadUser is Offline
Frequent Member
Posts:21

7/25/2008 3:13 PM  
Ok, I changed it to this: var vCompany=lawForm.getDataValue("EMP-COMPANY");

(I assume you meant getDataValue not getFormValue in you response).

Same results as I described above.

John HenleyUser is Offline
Super Member!
Posts:1235

7/25/2008 3:48 PM  
Try putting this in before you the lawForm.SetDataValue() functions
lawForm.setActiveTab('TF0-1');

Thanks for using the LawsonGuru.com forums!

John
wilcoxmadUser is Offline
Frequent Member
Posts:21

7/28/2008 7:44 AM  

Thanks John, that worked.

I also added another lawForm.setActiveTab('TF0-0'); statement, near the bottom, to make the Main tab be the one that appears first.

Thanks for your help! Mark.

wilcoxmadUser is Offline
Frequent Member
Posts:21

8/19/2008 2:17 PM  

Any other ideas here? The users were not happy when the main tab is always the one they see no matter which tab they started on.

TIA! 

To join the discussion you need to register first. (Registration is free!) If you are already a registered user please login to join the discussion.
Forums >Lawson BPM (Business Process Management) >Design Studio > Form won't load new data on initial INQ



ActiveForums 3.7
Forum Postings...Minimize
S3 Systems Administration
RE: LDAP Bind issue
10/10/2008 4:15 PM
Since your ldap is already bin...
Lawson Business Intelligence/Reporting/Crystal
RE: Crystal report links error?
10/10/2008 3:49 PM
Checked with the Database guru...
S3 Security
LDAP on Lawson 8.0.1.3 After Domain Move
10/10/2008 2:50 PM
Lawson 8.0.1.3 SQL Server 20...
S3 Security
Application Event ID 32770
10/10/2008 2:04 PM
We have lsf9.0.0 running and r...
S3 Systems Administration
LDAP Bind issue
10/10/2008 10:39 AM
I just completed an LDAP Bind ...
S3 Customization/Development
RE: Process flow Integration vs custom integration
10/09/2008 5:15 PM
ProcessFlow Integrator does no...
S3 Customization/Development
Process flow Integration vs custom integration
10/09/2008 12:44 PM
We are going to be connecting ...
S3 Procurement
Symbol Hand Held remote desktop software
10/09/2008 11:03 AM
Does anyone know if the softwa...
S3 Systems Administration
RE: BouncyCastle install
10/09/2008 10:53 AM
Jimmy, I was able to get it...
S3 Customization/Development
RE: Customizing Plan Names in ESS Annual Benefits Enrollment
10/08/2008 3:34 PM
John, After taking a deeper...
S3 Systems Administration
RE: LDAP bind - Lawson-delivered service accounts
10/07/2008 9:25 AM
With the exception of pfadmin,...
S3 HR/Payroll/Benefits
MSS Job Reqs
10/07/2008 9:24 AM
We are implementing MSS Job Re...
S3 Systems Administration
LDAP bind - Lawson-delivered service accounts
10/07/2008 8:59 AM
To all, I recently complete...
S3 Financials
RE: AR Reconciliation
10/07/2008 8:33 AM
You need to look at unassigned...
S3 Financials
AR Reconciliation
10/07/2008 8:15 AM
In theory, shouldn't the AR250...
Home  |  Forums  |  Jobs  |  Store  |  About