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.
Go to Queries / Reports.
Select your document export query, or create a new one.
Select Join.
From the Document category, select Application → Continue → Save and New.
From the Application category, select Person → Continue → Save and New.
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.
Select Subquery Export.
Configure the following settings:
Name: Enter
pdf:fileOutput: 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
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.
