Select return value

Sort:
You are not authorized to post a reply.
Author
Messages
Terry P
Veteran Member
Posts: 234
Veteran Member

    I'm still trying to figure out how to get the value from a select IDA call. Here is the function this is executed when they click a button at the top:

    //*********************************************************************************
    // If the user clicked the lookup employee  button
    //*********************************************************************************

    function btn_LookEmp()
    {
     idaCall = "/servlet/ida?_STY=&_TYP=SL&_OUT=XML&_PDL=LAWAPP8&_SYS=HR&_KNB=H07&_FN=EMPLOYEE&_IN=EMPSET6&HU4=0&H20=GE&HCU=&01=2082&_RECSTOGET=27"

      top.lawsonPortal.tabArea.tabs["PAGE"].clearNavlets();
       top.lawsonPortal.drill.doSelect(window, "returnSelect", idaCall)
      
      return;
    }
    // *******************************************************************************

    This is the function that executes when the IDA call is finished. I know it's getting here because of the alert message.

    //*********************************************************************************
    // After a user returns from Select IDA call
    //*********************************************************************************
    function returnSelect()
    {
     alert("Need Value Returned Here")
      return;
    }
    // *******************************************************************************

    I know there must be a way. I just can't figure out the code or syntax to get the EMPLOYEE number of the line the user clicked on. I found this in the Object Viewer, but it makes no sense to me and I can't figure it out.

    Method: Drill.doCallback
    Returns [undefined]
    Parameters
    retVal [object]
    Remarks
    Performs the callback function. Normally only invoked by the Drill object itself.

    jamesraceson
    Veteran Member
    Posts: 52
    Veteran Member
      I found this thread, but was very disappointed to find that no one had either found an answer or follow up with another way to get the information. I am having this same exact issue and would love to find out if there is a way to do this. I have searched the Forums and articles and have not found the answer yet.
      Terry P
      Veteran Member
      Posts: 234
      Veteran Member

        James - I never have found the answer either. I spent some time at CUE last year and spent some time "in the pit". None of them could tell me how or if it could be done. But I know it can.

        jamesraceson
        Veteran Member
        Posts: 52
        Veteran Member
          Terry,

          Though some tedious work, I found a way to do this. The "key" is in the keysNode return from the OnAfterDrillSelect function (on the Text object). For example:

          TEXT_OnAfterDrillSelect(id, keysNode, row)

          What you first do is check the id of the text box that you want to look at. For example:

          if (zId == "text2")

          If the id is the one that you want, then you look at the keysNode itself with a variable. For example:

          var keys = keysNode.getElementsByTagName("KEYFLD")

          Once that is done, you can they look at the values in the keys variable (alert the value out to the screen). After that, you then set another variable to the node you want. For example:

          var zSession = keys[0].childNodes[0].nodeValue

          Then from there you can do any logic checking that you want to sent the value to another function to process the value.

          Terry P
          Veteran Member
          Posts: 234
          Veteran Member
            Good job James! I'll give it a try and let you know the results. How the heck were you able to track that down?
            jamesraceson
            Veteran Member
            Posts: 52
            Veteran Member
              Terry,

              LOL. Yeah, that took a lot of fustrating hours of beating my head against my desk. At first, I couldn't find a way to look at the return from the IDA call. I then was conversing with a friend and he suggested since the IDA return was an object, see if there is a text value with it. I then looked at the text return of the object and saw that it was formatted in XML. From there, it was just a matter of looking at the specific node that I wanted and returning the value from it.
              John Henley
              Senior Member
              Posts: 3348
              Senior Member
                Man, that's pretty sick that you talk about Lawson with your friends ;)=
                Thanks for using the LawsonGuru.com forums!
                John
                balayogesh
                Basic Member
                Posts: 11
                Basic Member
                  Guys,
                  I think you might got this working. Can you share it little briefly. It would be helpfull
                  You are not authorized to post a reply.