Skip to main content

Hi All,

I’m try to setup the flow that receives file from a FTP server in multiply folders  and then send an email with the subject containing the sub folder name. The flow I've create is as per  below
 

In the  Navis, a script, connector I've added the below script however I keep receiving the below message
Formatter > subfolder_path ] failed in the evaluation of lsubfolder_path]. The error was: The value of the attribute could not be accessed: The attribute does not exist.


please can anyone guid me to a better solution or why I’m receiving the message.

<arc:script>
  <arc:set attr="output.header:subfolder" value="osubfolder_path]" />
  <arc:set attr="output.filepath" value="lfilepath]" />
  <arc:set attr="output.header:email" value="remail_address]" />
  <arc:set attr="output.header:subject" value=":email_subject]" />
  <arc:push item="output" />
</arc:script>

Hi Lansleys,

Thank you for reaching out to us.

The error message suggests that the attribute subfolder_path does not exist in the context where the script is being executed. This means that subfolder_path is either not being set in the flow or is not accessible when the script runs.

When receiving a file from a File or FTP connector, a header named RemotePath is automatically available. This header contains the full path of the file, including its subfolder structure.

 

If you need the subfolder name, you can extract it from the RemotePath header instead of relying on subfolder_path, which may not exist. Depending on your requirements, you can:

  • Use the full RemotePath directly.
  • Trim the path to extract only the subfolder name.

Here’s a sample script for reference:

<arc:script>
<arc:set attr="output.header:subfolder" value="v_message.header:RemotePath]" />
<arc:set attr="output.filepath" value="vfilepath]" />
<arc:set attr="output.header:email" value="[email protected]" />
<arc:set attr="output.header:subject" value="hi" />
<arc:push item="output" />
</arc:script>

If you need help extracting only the subfolder name, let us know how your file paths are structured, and we can assist with the correct trimming logic.

Looking forward to your response.