RPE - Output filename using template variable?
One answer
While configuring output in RPE, you can use an environment variable/system variable, but not template variable. Suppose you have environment variable "opfilename" with value "TestCase_101.docx", providing the "Path" property for Word output as C:\${opfilename} will result in creation of output file C:\TestCase_101.docx.
If you can come up with a script to set environment variable through RPE template, you can use environment variable value in output path.
Since you get the value (of module name or WI summary) only during document generation, you cannot use Macro with parameters or Post-Command (where you should know the value beforehand).
You can go through blog https://jazz.net/blog/index.php/2020/02/03/data-driven-approach-for-generating-multiple-output-documents-with-ibm-engineering-lifecycle-optimization-publishing/ where "Document Break" element is used to dynamically set the file name (to get individual files as deliverables).