Inquire when Hidden Key does NOT contain all necessary values

 4 Replies
 0 Subscribed to this topic
 13 Subscribed to this forum
Sort:
Author
Messages
Craig Derksen
Basic Member
Posts: 14
Basic Member
    A couple of years ago, I had the task of setting up some shortcuts that inquired on the HR11 while passing default values. These queries worked just fine and were variations of this:

    domain/lawson/portal/index.htm?_PDL=SYSINT2&_TKN=HR11.1&_HK=4321000001000

    Now, fast forward a couple of years and the requirements have changed slightly to include additional forms. The first one on my list has set the tone for all the rest... The LP51. In examining the field definitions on this portal form, the _HK value is defined as 13 characters and is made up of LEL-COMPANY (4) and LEL-EMPLOYEE (9). The problem is that there are two more fields that are required in order to successfully inquire, LEL-SEQ-NBR (4) and LEL-HRH-OBJ-ID (12). When I populate those values, I can successfully execute an AGS call but no matter what I try, I cannot seem to get these values to populate when using the index.htm call. The funny part is that when I pass the OBJ-ID value in the _HK string, it appears in the return XML when viewed in Fiddler. I could not figure out what the lucky combination was to get the SEQ-NBR to embed.

    What I am asking, is there any way to pull up a form (without the user performing data entry) that retrieves values when the Hidden Key is defined smaller than will contain the required key values? I have seen an older posting that pretty much says "you're out of luck" but I was hoping that someone may have run into this and come up with a solution or knows a consultant who could. My background isn't heavy in Java or web programming but it would seem like the AGS calls that actually return values could be formatted using stylesheets and/or JavaScript files that make use of existing Lawson functions. Does anyone have any feedback or guidance that I could use to help the project team make an informed decision on what our options are in case user requirements are inflexible?

    Thanks!

    Craig
    Shane Jones
    Veteran Member
    Posts: 460
    Veteran Member
      I would think that if Lawson required information to perform an inquire you would not be able to get around that... If you find a way share it because other might have a use for it.

      I provide links to pre-populated forms in emails created by processflow but I always make sure I have all of the required fields included in my link. If you have process flow you could use the "Insert Form URL" button in the email node to create a fully functional link... (I do not have LP51 or I would look at it for you.)
      Shane Jones
      Tools: HR, Payroll, Benefits, PFI, Smart Office, BSI, Portal and Self-Service
      Systems: Lawson, Open Hire, Kronos, Crystal Reporting, SumTotal Learning
      ** Teach others to fish...
      Craig Derksen
      Basic Member
      Posts: 14
      Basic Member
        What we wound up doing was more closely examining the business requirements for performing these inquires. It turns out that only two forms out of the 19 requested were "deal breakers" if we couldn't perform this special lookup. Since there were only 2 forms, we opted to use Design Studio to create custom forms. They use similar logic but here is the logic:

        URL:
        domain/lawson/portal/index.htm?_PDL=STAGING&_TKN=LP51.1&_ID=LP51.1_CUSTOM&LEL-COMPANY=0001&LEL-EMPLOYEE=000000000&LEL-SEQ-NBR=0004

        Logic from Design Studio Form:

        function FORM_OnInit()
        {
            /*
            Required Fields (as retrieved from Fiddler):
                _f2        LEL-COMPANY    sz=4
                _f4        LEL-EMPLOYEE   sz=9
                _f7        LEL-SEQ-NBR    sz=4
            */
            var argCompany  = portalWnd.getVarFromString("LEL-COMPANY",  portalWnd.document.location);
            var argEmployee = portalWnd.getVarFromString("LEL-EMPLOYEE", portalWnd.document.location);
            var argSeqNum   = portalWnd.getVarFromString("LEL-SEQ-NBR",  portalWnd.document.location);
            //
            if (argCompany != "" && argEmployee != "" &&  argSeqNum != "")
            {
                lawForm.setDataValue("LEL-COMPANY", argCompany);
                lawForm.setDataValue("LEL-EMPLOYEE", argEmployee);
                lawForm.setDataValue("LEL-SEQ-NBR", argSeqNum);
                //
                lawformDoFunction("I");
            }
        Craig Derksen
        Basic Member
        Posts: 14
        Basic Member
          Please note that the code above came over kind of wacky. In the "if" block, the Javascript "ands" were escaped instead of literals. I apologize if this is beating people over the head with the obvious but I know how tempting it can be to Copy and Paste...

          Thanks for your advice!
          John Henley
          Posts: 3353
            Posted By Craig Derksen on 10/03/2011 08:26 AM
            Please note that the code above came over kind of wacky. In the "if" block, the Javascript "ands" were escaped instead of literals. I apologize if this is beating people over the head with the obvious but I know how tempting it can be to Copy and Paste...

            Thanks for your advice!

            Craig, I cleaned that up ...
            Thanks for using the LawsonGuru.com forums!
            John