How to use mapped field to name output file?

I want to use the value of a field from the datamapper to name the PDF I am saving to a folder. How to do this?

First, the big link: Variables available in Output

This documentation will guide you through all of the various variables you can use to name files on output. But getting to that point will require putting a few pieces together.

So once you have your template and datamapper set up, your next step is going to be to create a Job Preset.

Your goal here will be to pass your field value into the Connect meta data. Just click the Include met data option and hit Next

At the next screen, you’ll choose where to put your meta data tag and which fields to include. Click the green plus to choose the fields you want. As for where to put it? I’ll come back to that. For now, just put it in Document Tags and click Finish.

Next up, start creating an Output Preset. As soon as you begin, you must select the previously saved Job Preset in the drop down at the bottom. Here I’ve named my Job Preset “ID Meta”.

Finally, you’ll be able to set up the file name. This is where the Meta Data Tag Level becomes important. Metadata fields are only available to the Job Output Mask if we are also separating the job on the same level where the Metadata exists. So here I’ve clicked the blue pencil button next to the Job Output Mask and chosen Document separation since I also chose the Document level for the metadata.

The Output Mask can then be pieced together as desired. I chose the following:

${document.metadata.ID}.${template.ext}

So the first part is simply pulling in the field we stored in metadata at the document level. The last bit is giving us the file extension. Note that the screenshot is a bit off since ${template.ext} doesn’t include the period for the extension.

That’s it in a nutshell. When you run this through Workflow, just be sure that you don’t check “Output Management Through Workflow”. Just let the output preset handle the placement of the files. If further processing is required, pick them back up again from that output location and process them from there.