Merge Tables
This article explains what merge tables are and how they're used to display source document information, for example from sales invoices or shipment notices, in the email body so the receiver doesn't have to open an attachment to access important information.
Merge tables in the email body efficiently present merge fields in an organized manner. Unlike standard tables, merge tables in Document Output offer enhanced flexibility.
Primarily, merge tables dynamically adjust their structure to accommodate varying amounts of data, ensuring optimal presentation, regardless of content. For instance, sales invoices often feature varying numbers of invoice lines, while reminder documents may contain differing quantities of document numbers.
Moreover, merge tables support functionalities such as summing columns or rows of data, and they facilitate the application of style templates so that visuals are maintained across different tables.
There will be three main sections in this walkthrough:
- To create a merge table for an email template, which will show how to edit the general data for a merge table and add/delete/move lines.
- To edit the table layout, which shows you how to edit the row and column headings.
- To edit the table style, which shows you how to style the table rows with color, background color, padding, etc.
This video is part of the course Get started using Document Output on Continia Learn.
To create a merge table for an email template
Document Output offers predefined merge tables for some email templates, but not all, so in some cases you'll need to create a new one from scratch. In cases where there are existing templates, you can easily just edit them to make them fit the needs of your company.
To create a merge table for an email template, do the following:
- Choose the icon, enter Email Templates, and then choose the related link.
- Select the email template for which you want to create a merge table.
- In the action bar, select Template > Merge Tables.
- Select New, which will create a merge table card for a new merge table. There are four FastTabs of which you can edit fields in three. The fourth, called Sample, gives you a preview of how the merge table will look in the email body. The FastTabs with editable fields are:
- General - here you edit the general information for the merge table, including description, table no., and line/sub table no.
- Html table - here you edit the table width and type
- Merge table fields - here you add/delete/move table lines and edit the fields in the table
- In the Merge table fields FastTab, you can use the actions:
- New Line to add a new line to the table
- Delete Line to delete a line from the table
- Move Up to move a line in the table up
- Move Down to move a line down in the table
- Number - this field displays the place in the line hierarchy this line appears
- Get Field From - specify from where the data is retrieved, either a table or a codeunit
- Field Type - choose a field type for the field: texts, hyperlink, link to email address, or picture
- Field - choose a merge field from a list
- Bold - check to make the field bold
- Text alignment - choose alignment, left, right, justified, or center
- Column Width - enter a value in % or px for the column width
To edit the table layout
Now that you've created a merge table, it's time to take a look at editing the table layout, which concerns column and row headers.
To edit the table layout for a merge table, follow these steps:
- While in the merge table card for the merge table you want to edit, select Table Layout in the action bar.
- In addition to the Sample FastTab, which shows a preview of your merge table, there are three1 FastTabs with options for editing your table layout:
- General - used for general information
- Top rows - used for adding/deleting lines and creating new rows on top of the table itself
- Bottom rows - used for adding/deleting lines and creating new rows in below the table itself
- If the table is set to be row oriented, there will be four FastTabs in addition to the Sample tab. The additional one is called Left Column and is used to add, delete and edit the layout for headers on each row.
To edit the table style
Next you have the option to edit the table style, which concerns colors, width, etc. in the table itself.
To edit the table style for a merge table, follow these steps:
- While in the merge table card for the merge table you want to edit, select Table Style in the action bar.
- Optional: You also have the option to choose from a number of predetermined styles, whcih can then be edited, so you create your own template that can be applied to any other table across different email templates, instead of building one from scratch. To choose a predetermined style, select Select Table Style in the action bar, and then choose a style.
- In addition to the Sample FastTab, which shows a placeholder table, there are two FastTabs with options for editing your table layout:
- Template - used for general information and editing table border color and width (note that you can search for and add colors using the standard hex color codes)
- Lines - used for editing color, background color, border width, border color, row/column in bold, and padding for rows (note that you can search for and add colors using the standard hex color codes)