Prerequisite Skills
When creating a Document Export query using the Configurable Joins - Document query base, a standard pdf:file export is available as a Direct Export, which generates a unique filename for the exported documents. This extends to Configurable Joins the functionality of the pdf:file export from the Slate Template Library - Document Export (Application) query base.
If you are required (or choose) to modify the file names of your exported documents, use the Configurable Joins - Document base to create a custom filename export using a Subquery Export.
Creating a custom filename export
If a custom file name is required, the pdf:file export can be built using a Subquery Export. This process requires two steps and starts with an optional step:
-
- Optional: Add joins
- Add the pdf:file subquery export and any additional required exports.
- Add literals to ensure the resultant file type is correct.
Step one (optional): Adding joins
You may require additional joins to access the information desired in the document filename. This example, used for materials associated with an application in Slate, adds three joins. The application and application/person joins will only return values for application-scoped materials.
1. Locate the Joins section at the bottom of the query summary page and click Join. An Insert Query Part popup appears. |
|
2. Select the Application export under the Joins section under the Document category. 3. Click Continue. An Edit Part popup appears to confirm the export. |
|
4. Click Save and New. The Insert Query Part popup appears. |
|
5. In the Joins section, under the Application category, select Person. 6. Click Continue. An Edit Part popup appears to confirm the export. |
|
7. Click Save and New. The Insert Query Part popup appears. |
|
8. In the Joins section, under the Document category, select Lookup Material. 9. Click Continue. An Edit Part popup appears to confirm the export. |
|
10. Click Save. The query summary page appears with the three new joins added. |
|
Step two: Adding exports
With the appropriate joins in place (if any), the pdf:file subquery export can be built as follows:
1. On the query summary page, in the Exports section, click the subquery button 2. Name the export pdf:file. 3. Change Output to Concatenate. Options for Row Separator and Row Offset appear. Leave these fields as-is. |
|
4. Add the desired exports to use for the file name. In this example, the exports are:
5. Click Continue. The exports appear on the Edit Part popup for the subquery export. |
Step three: Adding literals
Add literals to the exports to ensure that the resulting file type is correct and make the file name more readable.
This example adds dashes.
1. Click the Literal button on the Exports line. An Edit Part popup appears. |
|
2. Give the literal a value for Name, and add the literal character to the Literal field. In this case, the literal is a dash (-) character. The Name value can be anything, but to keep things easier to follow, the dash is used in both the literal and the Name values. 3. Click Save. The literal appears in the list of exports. |
|
4. Hover over the dash literal and select the copy icon. A Copy Part popup appears. |
|
5. Click Save Copy. The additional literal appears on the Edit Part popup list of exports. |
|
6. Drag the literal to the desired location in the list of exports. |
|
With the desired literals added to the base file name, create an additional literal and a file type export to complete the file name. 7. Click the Literal button. The Edit Part popup appears. 8. Add a period (.) for the Literal value (you can also use the period character for the Name). 9. Click Save. |
|
10. Click the Export button. An Insert Query Part popup appears. 12. In the Direct Exports section, under the Document category, select File Type. 13. Click Continue. The Document File Type export is added to the list of exports. |
|
14. Click Save. The completed subquery export for generating the custom file name now appears on the query summary page. |
|