Help on self.jsreturn.record[] or DME

Sort:
You are not authorized to post a reply.
Author
Messages
JudeBac
Veteran Member
Posts: 129
Veteran Member

    Greetings all,

    See attached.

    Not sure how I am going to word this but here goes: In MSS Personnel Actions, we have created a new action. Once you select that action and click "Continue", a simple new selection field will appear. This is a drop down field. It will list the DESCRIPTION but will return the CODE. Now I added a text field next to this drop down field that will show the DESCRIPTION of the CODE. I can get the value of the CODE field using:

    var obj = self.main.document.getElementById("fieldSelect"+n);

    I see that n is always zero. Anyway, this obj stores the selected CODE and the value say is 115. This CODE is in table lawson.PCODES and HR04.7. I have the value for columns TYPE and CODES. I need to get DESCRIPTION. Can you share how to properly query this to return the description? Below is what I have been doing. Also, I see that I can also use self.jsreturn.record, if only I know how to get the selected item number: example:  self.jsreturn.record[0].description; This return the DESCRIPTION of row 0. Problem is row 0 is not the one selected. How do I get the correct row number of the CODE selected? In my example: user selected CODE 115, which row is this in self.jsreturn.record[0].description; ? (not 0)

    Another way is this? Below will get me object not valid (or something)

     var s = top.AGSPath + "?_PDL=";
            s += authUser.prodline;
            s += "&_TKN=HR04.7&_EVT=CHG&_LFN=ALL&_TDS=IGNORE&_RTN=DATA&FC=I";
            s += "&PCO-TYPE=92"; //+uf_pco_type;
            s += "&codes=115"; //+uf_suppnum;
            s += "&_OUT=XML&_EOT=TRUE";
        var sAGSInfo = top.httpRequest(s);
        var uf_desc = sAGSInfo.selectSingleNode("//description").text;

     Please let me know if this make sense. Thank you.

    jude

    JudeBac
    Veteran Member
    Posts: 129
    Veteran Member

      Hi all, I found a way on self.jsreturn.record. I loop through self.jsreturn.NbrRecs and if found self.jsreturn.record.code==v_code then assign self.jsreturn.record.description=v_desc.

      However if jsreturn was not populated via dropdown but through user input directly, jsreturn has no record.Can you please help me instead put this to javascript. This is in pactions.htm

      PROD=PRODDB&FILE=PCODES&INDEX=PCOSET1&KEY=91=115&FIELD=DESCRIPTION&OUT=CSV&DELIM=~

      Thank you,
      Jude

      JudeBac
      Veteran Member
      Posts: 129
      Veteran Member

        just want to share what I did, thanks

        var uf_suppnum = self.main.document.getElementById("fieldSelect"+n).value;

        for(var i=0;i

         {
                uf_selfcode = self.jsreturn.record.code;
                if (self.jsreturn.record.code == uf_suppnum)
                {
                    uf_suppname = self.jsreturn.record.description;
                    break;
                }
            }

        You are not authorized to post a reply.