Renaming an email message's report file attachment based on certain static and dynamic parameters set in report

Hi,

I found answer for rename file attachment from Adonix X3 v6, send using 4GL using AIMP3 with hardcoded entry, and how to recurring send the report using APRINT, but no specific answer for this case.


Reference used

https://www.sagecity.com/us/sage_x3/b/sageerp_x3_product_support_blog/posts/attachment-names-look-cryptic-on-workflows-read-blow-to-learn-how-to-fix-that

www.sagecity.com/.../workflow-to-automate-sending-crystal-reports

Context

- Sage X3 v12p33

- I have a report that uses a customized APRINT workflow rule and will be sent out using Recurring Task.

- The first row, first column, is a dynamic date based on end of month (set from Recurring Task).

- The third row, first and second columns, are static details.

Target

Client PoV:

- When receive email by end of month, the file attachment is named as per below:

- File attachment: CUSSTA_20230831_AE011_AE012.pdf

Sage implementer PoV:

- How to pull the information from the report's parameters during runtime?

  • 0

    Current research status:

    Another issue I found is that the email's PCEJOI(1) is still using the old filename.
    I have no idea how to replace it to match attachment's filename

  • 0 in reply to chunheng

    The `RPT` screen is open, so:

    `NAME = '\' + [M:RPT]RPTCOD + '_' + [M:RPT]VALEUR1(2) + '_' + [M:RPT]VALEUR2(2)`

    The AWRK entrypoint under MESSAGE action label able to read the static report's parameter so the file name now have the static parameters as part of attachment's filename.

    Haven't test for dynamic parameter or parameter with defined date (the date format was confused as file path separator for my side; Haven't figure out how to fix this).

    For the email message content, I have no idea how to update it.

    It seems like the email message content was completed and the entry point AWRK only affected the file attachment?