AGS Update to AP20 detail

 2 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
AJ
Basic Member
Posts: 6
Basic Member
    I have a processflow that is adding a detail record to the AP20.  After the add takes place under some conditions I need to go back and update the record that was just added.  I am having a hard time identifying the record that was just added when there are multiple records.  I thought that I could get return variables from the previous AGS transaction such as and use that to identify the record that was added.  But I am not getting anything returned.

    I do not see any other way to identify a detail record besides fc0 or fc1, etc...  I need to do this dynamically instead of referring to r0.

    The add:
    _PDL=&_TKN=AP20.1&_EVT=CHG&_RTN=DATA&_LFN=ALL&_TDS=IGNORE&FC=C&API-VENDOR=&API-INVOICE=&API-COMPANY=&LINE-FCr0=A&APD-DIST-COMPANYr0=&APD-DIS-ACCT-UNITr0=&APD-DIS-ACCOUNTr0=&APD-ACTIVITYr0=&APD-ACCT-CATEGORYr0=&APD-DIS-SUB-ACCTr0=0&APD-ORIG-TRAN-AMTr0=&_DELIM=%09&_OUT=XML&_EOT=TRUE

    The update:
    _PDL=&_TKN=AP20.1&_EVT=CHG&_RTN=DATA&_LFN=ALL&_TDS=IGNORE&FC=C&API-VENDOR=&API-INVOICE=&API-COMPANY=&LINE-FCr0=C&APD-DIST-COMPANYr0=&APD-DIS-ACCT-UNITr0=&APD-DIS-ACCOUNTr0=&APD-ACTIVITYr0=&APD-ACCT-CATEGORYr0=&APD-ORIG-TRAN-AMTr0=20&APD-ASSET-TEMPLATEr0=&APS-ITEM-QUANTITYr0=&APS-INSRV-DATEr0=&APS-PURCHASE-DATEr0=&_DELIM=%09&_OUT=XML&_EOT=TRUE

    Any help would be greatly appreciated.
    TBonney
    Veteran Member
    Posts: 281
    Veteran Member
      Have you tried incorporating the CREATE_DATE (yyyy-mm-dd 00:00:00.000) into your transaction query? Utilizing that in conjunction with your other criteria should allow you to accurately identify the ones you just added. I do something similar through SQL queries, identifying invoices that were created on any given given day.
      AJ
      Basic Member
      Posts: 6
      Basic Member
        In looking at the data it does not appear that any of the date fields are being populated to help identify.  I am seeing a DIST_SEQ_NBR that appears to be unique and incremented when I add another line.

        I was expecting to have access to output variables like  (NODENAME_FieldName) and be able to use DIST_SEQ_NBR in the update query, but I am not getting any variables.  Also, would I still use the r0 after the fields?