Chapter 2
File templates
A file template describes the layout of a file you work with: what kind of file it is, how its fields are separated, whether it has a header row, and which columns it carries. Mappings, transforms and validation all read files through a template.
The File Templates list
Open File Templates from the Transform group. The list shows every template you have saved and how many of your 10 you have used. The command bar offers:
- New: create a template.
- Edit: open the selected template.
- Duplicate: copy the selected template, with its columns and reading settings, into a new template, a quick start for a similar file.
- Delete: remove the selected template.
- Refresh: reload the list from this browser's storage.
A template with no columns is flagged in the list, because nothing can be mapped or validated from it.
Creating a template
- Click New.
- Enter a Template name. This is the name you will pick from in the transform wizard, validation and the mapping editor.
- Choose a File type: CSV, TSV or Excel (.xlsx). Excel templates read the first worksheet.
- Optionally add a Description, for example which system produces the file and who receives it.
- Under Reading, set the Delimiter, the character between fields (use
\tfor a tab). It is ignored for Excel. - Tick The file has a header row if the first line holds column names. When it does, the file's header names are matched to your columns by name rather than by position. Untick it for files that start straight into data.
- Add the columns (below), then click Save.
Columns
Click Add column for each column in the file, in order. For each one set:
| Field | What it means |
|---|---|
| Name | The column's name in the file. Rows without a name are highlighted until you fill one in. |
| Type | String, Integer, Decimal, Date or Boolean. Validation checks each value against it. |
| Required | Tick it if every row must have a value in this column. Validation reports empty required values. |
Use the arrows to move a column up or down, and the bin icon to remove it. Remove All in the command bar clears every column.
The 10-template limit
The free edition stores up to 10 templates. When you have 10, saving another is refused with the message "You have reached the limit of 10 file templates." Delete a template you no longer use, or export your work first (chapter 6) and keep the file as an archive. Any paid module removes the limit Full edition.
Next
With templates for your incoming and outgoing layouts, build a field mapping between them, or check a file against a template with Validate File.