using ${variableName:attributeName} in the body of an email

Post any question you may have in regards to GoAnywhere MFT and let our talented support staff and other users assist you.
If you need a quicker response, please create a support ticket via the customer portal my.goanywhere.com or contact our support team by email at [email protected].
2 posts Page 1 of 1

fthomas

Posts: 8
Joined: Fri Feb 24, 2017 9:40 am

Post by fthomas » Fri Sep 07, 2018 4:32 pm
I have an email that I am trying to list the names of the files in a file list variable. When I use ${filelist:name} it errors with: Method 'getName' or 'isName' not found on class 'com.linoma.dpa.util.FileList'. Original expression: retfiles:name.

Is this not acceptable in the body of an email?

Thanks

Support_Julie

User avatar
Support Specialist
Posts: 91
Joined: Thu Mar 05, 2009 3:49 pm
Location: Ashland, NE USA

Post by Support_Julie » Mon Sep 10, 2018 10:00 am
You can use the file list variable in the email message body without the file attribute (name). That will give you a list of the files that include the folder path.
${retfiles}

If you do not want the path information, then you can create a temporary print file.

You would need to do a For Each loop thru the file list.
Using the PRINT task, write the file name to a temporary file: ${retfiles:name}${system.lineFeed}

Then using that temporary file, Add a File to the message body.


for example:
<forEachLoop itemsVariable="${retfiles}" currentItemVariable="CurrentItem">
<print file="${system.job.workspace}TempFile.txt" version="1.0">
<![CDATA[${CurrentItem:name}${system.lineFeed}]]>
</print>
</forEachLoop>
<sendEmail resourceId="HelpSystem" toList="[email protected]" keyLocation="KeyVault" version="2.0">
<from address="[email protected]" keyLocation="KeyVault" />
<subject>
<![CDATA[test]]>
</subject>
<message file="${system.job.workspace}TempFile.txt" />
</sendEmail>
Julie Rosenbaum
Sr Support Analyst
e. [email protected]
p. 1.800.949.4696
w. HelpSystems.com
2 posts Page 1 of 1