Using getattachrec.exe to retrieve URL in Process Flow Pro

 4 Replies
 0 Subscribed to this topic
 1 Subscribed to this forum
Sort:
Author
Messages
Vukman
New Member
Posts: 4
New Member

    Trying to retrieve the URL for the Requisition Header Attachment in Process Flow Professional usnig getattachrec.exe.  Can anyone help with what I need to put into the Web Run?  Here's what I have to no avail.  (Also - see attachment for complete image of WebRun window.

    _OUT=TXT&_PDL=LAWAPP9&_FN=REQHEADER&_IN=RQHSET1

    &_ON=Requisition+Header+Attachments&_ATYP=U&_AUDT=I

    &_OPM=T&_ATTR=TRUE&_AOBJ=TRUE&K1=10&K2=266

    David Williams
    Veteran Member
    Posts: 1127
    Veteran Member

      See my blog entry as well as the attached screen shot: http://consultdavidw.blog...chrecexe-cgi-to.html

      My blog describes how to do this with JavaScript in Design Studio and my screen shot is an example of how I used the WebRun to get a PO Header comment.

      Attachments
      David Williams
      Derek Czarny
      Veteran Member
      Posts: 63
      Veteran Member
        This is what I used, mostly from David's blog.

        &_OUT=XML&_PDL=&_FN=REQHEADER&_IN=RQHSET1&K1=&K2=&_ATYP=U&_AUDT=I&_USCH=http&_OPM=T&_DATA=TRUE&_ECODE=FALSE

        You then have to get the results of the getattachrec from a javascript variable to attach it to your email like:

        //RQCheckAttach is the name of my getattachrec webrun
        var Attachback = RQCheckAttach_result;
        var D = Attachback.indexOf("AttData")
        var F = Attachback.indexOf("/AttData")
        var myAttach = Attachback.substr(D+18,F-D-23);
        var myAttach = escape(myAttach);
        var myAttach = myAttach.replace(/%5C/g,"%5C");
        //Set for input button
        //var myAttach = "'" + unescape(myAttach) + "'" ;
        var myAttach = unescape(myAttach);
        var vresults = myAttach.length

        if (vresults >= 1)
        {var vEmailAttach = '

        Click here to see attached quote

        '}
        //{var vEmailAttach = ''}
        else
        {var vEmailAttach = ''}
        Gary Davies
        Veteran Member
        Posts: 248
        Veteran Member

          Your key fields &K1 and &K2 are in the wrong spot, they need to be part of the Index paramater  (&_IN=RQHSET1&K1=1&K2=266) . If you are going to send the output to TXT yoiu will have to parse the D:0= returned, otherwise if you have OUT=XML then you could feed it to an XML Parse node then refer to the AttData varaiable from that node.

          Vukman
          New Member
          Posts: 4
          New Member
            Thank you both - I was able to get it working with your input. Went with the XML output and Derek's explanation of parsing out the data.

            Works like a charm! Thanks again.