Overview
It is possible to use a field value from the source as the destination file name.
Process
The technique below explains how to set the destination file name to the value of one of the fields in the source:
Step 1. Set up a Flow where the destination is a file.
Step 2. When creating the transformation, click MAPPING
, and select the Parameters
tab.
Step 3. Make sure Stream Data
is unchecked.
Step 4. Enter the following code into the Additional Transformations->After Extract
field:
var props = com.toolsverse.config.SystemConfig.instance().getProperties();
// InvoiceNo is just an example. Use whatever field name it makes sense to use.
props.put("InvoiceNo",
dataSet.getFieldValue(dataSet.getRecord(0), "InvoiceNo").toString());
InvoiceNo
in the code above is just an example. Use whatever field name it makes sense to use.
Step 5. Click Back
.
Step 6. Enter {InvoiceNo}.xml
into the TO
field:
Use the same variable (token) name that you used in the code example above.
Comments
0 comments
Please sign in to leave a comment.