Login | Sign Up
 
  Search  



Site Map
 
HomeMy PagesMy ProfileMy MessagesMy FriendsMore MembersMy GroupsView GroupMore GroupsMy PurchasesAppsS3 AppsS3 FinancialsS3 HR/PayrollS3 ProcurementS3 Supply ChainM3 AppsEnterprise Asset Management Manufacturing OperationsFinancialsBPM/EPM/LBIDesign StudioEnterprise Reporting (Crystal)Microsoft Add-InsProcessFlow / BCISmart NotificationSmart OfficeTechDatabase 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 TipsArticlesAboutJohnContentUser ManagerBulk User ManagerBackupsMonitorVenexusVenexus Web ControlsViewArticleSignUp!LoginAdminSite SettingsTabsSecurity RolesUser AccountsVendorsSite LogBulk EmailFile ManagerRecycle BinLog ViewerSkinsLanguagesSite WizardAuthenticationSolutionsPageBlaster

Top 10 Posters
 
Tips on Using the LawsonGuru ForumsMaximize

LawsonGuru ForumsMinimize
Form won't load new data on initial INQ
Last Post 08/19/2008 03:17 PM by wilcoxmad. 8 Replies.
Printer Friendly
Sort:
PrevPrevNextNext
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
Private
Private
Basic Member (47 points)
Basic Member
Posts:27
wilcoxmad

Send Message: Send Private Message

--
07/24/2008 07: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
Private
Private
Veteran Member (3333 points)
Veteran Member
Posts:1677
John Henley

Send Message: Send Private Message

--
07/25/2008 08:44 AM  

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


Thanks for using the LawsonGuru.com forums!

John
wilcoxmadUser is Offline
Private
Private
Basic Member (47 points)
Basic Member
Posts:27
wilcoxmad

Send Message: Send Private Message

--
07/25/2008 01: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[0].getElementsByTagName("COL");
  //get jobclass from XML object.
  vJobCls = vCols[0].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[0].getElementsByTagName("COL");
  //get jobclass from XML object.
  vJobClsDesc = vCols[0].firstChild.data; 
  lawForm.setFormValue("text166",vJobClsDesc);
  return true;
 }
}

John HenleyUser is Offline
Private
Private
Veteran Member (3333 points)
Veteran Member
Posts:1677
John Henley

Send Message: Send Private Message

--
07/25/2008 03: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
Private
Private
Basic Member (47 points)
Basic Member
Posts:27
wilcoxmad

Send Message: Send Private Message

--
07/25/2008 04: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
Private
Private
Basic Member (47 points)
Basic Member
Posts:27
wilcoxmad

Send Message: Send Private Message

--
07/25/2008 04: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
Private
Private
Veteran Member (3333 points)
Veteran Member
Posts:1677
John Henley

Send Message: Send Private Message

--
07/25/2008 04: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
Private
Private
Basic Member (47 points)
Basic Member
Posts:27
wilcoxmad

Send Message: Send Private Message

--
07/28/2008 08: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
Private
Private
Basic Member (47 points)
Basic Member
Posts:27
wilcoxmad

Send Message: Send Private Message

--
08/19/2008 03: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.

Active Forums 4.1
Forum Postings...Minimize
RE: Modifying HTML in 9.0
07/03/2009 11:03 AM
I usually copy and paste the description of the pa

Security Administrator won't connect.
07/03/2009 10:36 AM
Once in a while, security administrator won't conn

RE: Two Questions:
07/03/2009 10:07 AM
what programs are doing this?

RE: Lawson Support - Staffing Question
07/02/2009 09:02 PM
The documentation library from Lawson, the support

RE: User 'lawson' SSO Password
07/02/2009 02:26 PM
Matt - thank you for the information. I'll change

ed810 not pulling tax
07/02/2009 12:40 PM
we are currently 8.03 sitting on 9.0lsf and use Gh

RE: Crystal for Financial Reporting
07/02/2009 11:17 AM
However, it is only for summary accounting units,

RE: Sarbox Compliance
07/02/2009 08:40 AM
John, We piloted the security dashboard with AV

RE: Work file paths
07/01/2009 05:04 PM
"We have deleted the job going to the wrong direct

RE: CSV Export
07/01/2009 02:00 PM
Are you using portal? If so run the wh130 to crea

Home  |  Tips & Tricks  |  Forums  |  Jobs  |  Store  |  About