Customizing Exported Document File Names

Prev Next

When you build a document export query, you’ll find a standard pdf:file export available as a direct export. This export generates a unique filename for the exported documents. You can use a subquery export to make a custom file name export that recreates the functionality of the pdf:file export.

Step 1: Optionally adding joins

You may need to add joins to your document export query to access the data you want to include in the document filename. This example adds three joins to expose application materials to the query. The application and application/person joins return only values for application-scoped materials.

  1. Go to Queries / Reports.

  2. Select your document export query, or create a new one.

  3. Select Join.

  4. From the Document category, select Application → Continue → Save and New.

  5. From the Application category, select Person → Continue → Save and New.

  6. From the Document category, select Lookup Material → Continue → Save.

Step 2: Creating a subquery export

Next, build your custom pdf:file subquery export. This subquery export constructs a filename out of the person’s reference ID, the material’s export value, and the document’s date and file type.

  1. Select Subquery Export.

  2. Configure the following settings:

    • Name: Enter pdf:file

    • Output: Concatenate

    • Exports: Add exports to use in the file name. In this example, we include:

      • Person → Reference ID

      • Lookup Material → Export Value

      • Document → Date

      • Document → File Type

    • Literals: Add a dash - literal between each of the first three exports (the file information), then add a dot . literal before the last export (the file type). So, the concatenated export takes the form: REFERNCE_ID-EXPORT_VALUE-DATE.FILE_TYPE

  3. Select Save.

📝 To be a valid filename, the last two items in the subquery export must be the dot . literal and File Type, in that order.

Still looking for what you need?