This article will look at how to add a field from the data source within Ecrion Publisher tool. A field is a placeholder in your document template that is used at run time to retrieve the information from your data source and insert into the document when rendered. There are multiple ways to do this, which way you choose to use is user preference.
1. Open a Publisher that has a data source assigned;
2. There are two ways to add a dynamic field to your template:
a. Directly from the Data Source pane:
- Select the data point you wish to insert in the Data Source Pane. Hold down the mouse upon selection;
- Drag the data point to the Design Surface in the desired location and release;
- If the selected XML element is a parent element, a contextual menu will be shown in the Design Surface. To insert the element as a field, select the “Field” option. For example, to display the contextual menu in our case, drag and drop the “date” element instead of “Text()”.
b. Using the “Insert” tab:
- Place your cursor in the Design Surface where you would like to create your field;
- In the Ribbon, navigate to the “Insert” tab and select the “Field” option;
- From the “Insert Field” dialog, navigate through the data tree on the left and select the field you want to add to your template. (ex. date);
- Once selected the field, select the “Insert” button from the “Insert Field” dialog.
3. You will notice the new field inserted into the Design Surface. (ex. Text());
4. To see a preview of the output, you need to switch to the “Print View” mode under the “View” tab.