Adding a Data Label

A data label refers to a label or a text whose value is populated from the STDM database. The source (table and column) of the data label must be specified while designing the template. Thus, when a document is later generated using a template, the data label will be populated / filled by a value from the selected record's column value.

To add a data Label in Document Designer template, follow the steps below.

1. Select a data source by choosing a table or a view as shown below.

Note: Only the current profile tables and all views in STDM database load.

Note: Make sure you have selected a view of the current profile. STDM generated views start with the profile name. Thus, choose a view that starts with the current profile name.

2. Select a referenced table. The referenced table option is only applicable for view data source (see the image below).  A referenced table refers to a table that the template will be working for. In other words, the reference table forces the template to only work for a certain entity.  This is useful when Generating a document.

For this demonstration, the Person table is used as a referenced table but you can choose any other based on your needs.

Note: The above two steps are mandatory for views and the first step is mandatory for a table data sources.

3. Click on the Data Label button located in STDM Document Designer toolbar (see the image below). This enables you to draw a data label in the template.

4. Click at one point in the template page and drag the cursor. Release the cursor in the area you wish to add the label box.

While dragging it, you can see a red box and a cursor that looks like the plus (+) sign as illustrated in the image below.

When you release it, a box labelled [STDM Data Field] will be created, as shown below.

This box [STDM Data Field] will be replaced by a value that comes from the database.

5. While the box is selected, open the STDM item properties to choose the column, the Data Label will use. The Data Field / column will populate the data label when a document is generated using the template.

.

Choose the column you want the Data Label to use. For instance, for a person, you can choose the person_first_name column as shown below.

When you select a data field, the Data label text will change from [STDM Data Field] to the table name you have chosen. See the image below.

6. Repeat step 4 and 5 to add items from the same view.  If you wish to add a data label from another table, start from step 1.