When there is a need to have the same fields included in multiple tables but also keep them in sync so all occurrences can be updated from a single place the table templates can be used. A template table is just like any other table and can have any number of fields defined, the visual representation is the same and only difference is that the element icon is different.


There is no specific palette icon for a template table, any table can be set as a template at any time by simply setting the table 'Template' property to true in properties view.



Applying a template to a table can be done by updating the 'Templates' property of the table using the properties view, when pushing the edit button on the right side the following dialog opens and any number of templates can be applied.



When a template is applied all fields - except those that already exist in the table - are created as 'linked' fields. The element icon is again slightly different as that of a standard table field and by default the field is kept in sync with the one from the template table meaning any change done on the template field will be reflected in all corresponding field of tables that have the template applied.



However there is also possible to change the field properties, including the field name, at local table level to override the values set on the template - in those cases changes done on properties of the template field have no effect on the field properties. Some properties can't be changed at the local level, those includes the data type, extent and decimal if applicable. The only option to get the fields back in sync and loose local changes is to first unapply the template and apply it back.


When unapplying templates, depending on the preference settings, the following confirmation dialog might be shown - depending on user response the fields imported from the template are removed or are kept into the table but are unlinked from the template fields.