For created templates, you need to set a connection between the template field and a data source field, which is called mapping. Mapping will be used to fill in PDF fields with table or view fields data when an app user downloads a file.
Steps to map a template with a table or view:
- In a template, on the Mapping tab, from the Data source field, select the table or the view to which you want to map this template.
- If the table that you selected has relationships with other tables, in the Related tables field, choose whether you want to map document template fields with fields from related tables:
Note: You cannot use both related tables and the Use display value option in the same mapping configuration. If you select related tables, the display value option will not be available.
- Click the Edit icon.
- In the Related tables panel, in the Tables section, click the Add icon and select the related tables that you want to use for mapping or select All tables.
- If the table that is the main data source for mapping has more than one relationship with the related table that you selected, in the Relationship list, select the relationship that you want to use to get the records.
- Optional: For related tables that have a one-to-many relationship with the main data source table, in the Sort by fields section, click the Add icon, select the fields by which you want to sort the values, and then arrange the sorting order.
Sorting helps you make sure which records from related tables are returned first, which gives you greater control of the values that are used in the generated PDF document. - Click Apply.
- Confirm your settings by clicking Save.
Now you can map document template fields to specific fields in your data source:
- Mapping Templates
- Mapping One Template Field with One Table or View Field
- Mapping One Template Field with Many Table Fields through Parameters
- Mapping One Template Field with Related Table Fields
- Mapping Many Template Fields with One Related Table Field and Values from Different Records
- Mapping Many Template Fields with Only Part of the Value of One Field in a Table or View