--- title: "Customizing Exported Document File Names" slug: "customizing-the-document-file-name-in-a-document-export-query" updated: 2026-09-21T17:23:05Z published: 2026-09-21T17:23:05Z canonical: "knowledge.technolutions.net/customizing-the-document-file-name-in-a-document-export-query" --- > ## Documentation Index > Fetch the complete documentation index at: https://knowledge.technolutions.net/llms.txt > Use this file to discover all available pages before exploring further. # Customizing Exported Document File Names When you build a [document export](/v1/docs/getting-started-with-document-exports) 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](/v1/docs/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](/v1/docs/creating-a-document-export-query-with-configurable-joins). 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](/v1/docs/subquery-exports-outputs#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.** > [!WARNING] > 📝 To be a valid filename, the last two items in the subquery export must be the dot `.` literal and **File Type**, in that order. ![](https://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/Completed subquery export.png?sv=2026-02-06&spr=https&st=2026-11-14T01%3A34%3A56Z&se=2026-11-14T02%3A34%3A56Z&sr=c&sp=r&sig=PSNqV%2BgkPJOhF50Yp0dAY995Gtc4neUVnSrDNaSVIBw%3D)