Including a Missing PO Line Field in a DS PO20 Form

 4 Replies
 0 Subscribed to this topic
 12 Subscribed to this forum
Sort:
Author
Messages
S. Rosa
Basic Member
Posts: 7
Basic Member
    I'll start with the standard newbee disclaimer that I am new to DS and need a little help from the experts:blush: Background: This client does not own RQ or Process Flow but requires a basic form of PO approvals. We devised an approval process that would withstand audit using security setup, buyer limits and PO releasing.

    One of the approvers asked for a new form that would basically mimic PO20 except it would display much of the PLI and MMD fields that are within tabs or hidden. All was fine until a new requirement surfaced to include a PO line extended dollar amount inclusive of tax. I'm aware of PLI-LAND-UNIT-CST that contains the landed unit cost but it does not appear as an available field to add to my altered PO20 view/release form. The next challenge would have been to display the landed cost times the quantity.

    Any advice on how or if the landed unit cost could be part of a calculation (PLI-LAND-UNIT-CST X PLI-QUANTITY) displayed on PO20 would be much appreciated.
    Terry P
    Veteran Member
    Posts: 234
    Veteran Member
      Typically when a form does not make available a field you can "assign", then you'll be required to do a DME call to the table to retrieve the field. Once it's retrieved, you can display it on your form, or use in calculations. Once you're done one of these, it is pretty easy. If you need an example of how to do this - just shout out.
      S. Rosa
      Basic Member
      Posts: 7
      Basic Member
        [quote]
        Posted By Terry P. on 06/09/2010 06:48 PM
        Typically when a form does not make available a field you can "assign", then you'll be required to do a DME call to the table to retrieve the field. Once it's retrieved, you can display it on your form, or use in calculations. Once you're done one of these, it is pretty easy. If you need an example of how to do this - just shout out.
        [/quote]

        Thanks Terry. I'd love an example of how to do this!
        Terry P
        Veteran Member
        Posts: 234
        Veteran Member
          var sDME = ""

          var sCompany = lawForm.getFormValue("text79")
          var sVendor = lawForm.getFormValue("text80")
          var sInvoice = lawForm.getFormValue("text81")


          //Construct DME string
          sDME = portalWnd.DMEPath + "?PROD=" + strPDL
          sDME += "&FILE=APINVOICE&INDEX=APISET1"
          sDME += "&KEY=" + sCompany
          sDME += "=" + sVendor
          sDME += "=" + sInvoice
          sDME += "&FIELD=INVOICE" + ";AUTH_CODE"
          sDME += "&OUT=CSV&DELIM=~&NOHEADER=TRUE"


          //Return value from table
          var objhttp = new ActiveXObject("Msxml2.XMLHTTP")
          objhttp.Open("GET", sDME, false)
          objhttp.Send("UserInfo")

          sReturn = objhttp.responseTEXT

          aRecs= sReturn.split("~")

          sInvoice = aRecs[0]
          sBuyerCode = aRecs[1]
          S. Rosa
          Basic Member
          Posts: 7
          Basic Member
            Thanks again Terry!