DS Transaction Property Page problem-Populating keys

Sort:
You are not authorized to post a reply.
Author
Messages
Roger French
Veteran Member
Posts: 545
Veteran Member
    Hello,
    I'm building a custom portal page in Portal Page designer, based upon an existing application form (a simple query form) . The form uses COMPANY and EMPLOYEE as the keys.
    In the Transaction Property Page, in the Keys tab, I want to use the LAW_WEB_USR.company and LAW_WEB_USR.employee values to populate, respectively the COMPANY and EMPLOYEE keys. (The LAW_WEB_USR.company and LAW_WEB_USR.employee are both values which I select from the drop down list boxes under the Value column in the Transaction Property Page. The expectation of the portal page is that, when the user logs into Portal, the company and employee will of course be already be populated and known (from the security record).

    Ok so when I choose to preview the new portal page, it opens up Portal but my query/portal page brings back the message "Field is Required" which of course is a common message if you try to inquire on a form but the keys aren't populated. It appears that the values LAW_WEB_USR.company and LAW_WEB_USR.employee aren't being passed at all (in other words, the company and employee values aren't being passed to the form.)

    This is LSF9.0.0 5 with DS 9.0.0.5 on AIX platform.

    My question is : why isn't LAW_WEB_USR.company and LAW_WEB_USR.employee passing the values? What should be used instead? I don't of course want to pass literal values.

    Thanks,
    R


    thanef
    Veteran Member
    Posts: 47
    Veteran Member
      You have to put those variables on the indexes as you are building the query.
      Derek Czarny
      Veteran Member
      Posts: 63
      Veteran Member

        Did you try using an alert() to see if the LAW_WEB_USR.company and employee are being recognized?  Or did you try to hard code some values where you are using the variables to see if everything else is working correctly?

        Roger French
        Veteran Member
        Posts: 545
        Veteran Member
          hard code values (literals) work ok no problem; I don't want to use literals.
          thanef
          Veteran Member
          Posts: 47
          Veteran Member
            Did you put LAW_WEB_USR.company on the index tab and the api builder of Design Studio?
            Derek Czarny
            Veteran Member
            Posts: 63
            Veteran Member
              I understand you didn't want to use literals, I was just making sure the problem was with the variables you were trying to pass.  If I want to get the user's Company and Employee number from their profile setup in script section, I would use:

              portalWnd.oUserProfile.getAttribute("Company")
              portalWnd.oUserProfile.getAttribute("Employee")

              You might also try on your page init adding the attributes to a portalstorage so that you can refer to it in your Data Map section.

              function portalpage_OnInit()
              {
               pStorage = new PortalStorage()

              pStorage.addElement("EMP-COMPANY", portalWnd.oUserProfile.getAttribute("Company"));

              pStorage.addElement("EMP-EMPLOYEE", portalWnd.oUserProfile.getAttribute("Employee"))
              page.setObjectValues("objectname",pStorage)
              }
              You are not authorized to post a reply.