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 the Mapping
button and select the tab Parameters
.
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 4. Click Save and Close
.
Step 5. 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.