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 Steam Data
is unchecked.
Step 4. Check Execute Transformation Rules after extract
and enter the following code into the Transformation Rules
field:
importPackage(com.toolsverse.config);
var props = 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 Save and Close
.
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.