Creating a script expression to style headings
You can create heading styles on template elements, which
corresponds the values for data attributes or variables with certain
formatting properties.
About this task
You can use the parseInt(attribute_or_variable_name) JavaScript expression to align attribute or variable values with numeric values starting with 1. Then, to create subheadings on child data, add one to the expression: parseInt(attribute_or_variable_name) + 1. This script expression allows the values to correspond incrementally to the heading styles in all of the Microsoft Word, PDF, and HTML outputs.
Procedure
- Drag a
Text element into the template
content editor. - Select the text element.
- In the Properties view, select the General tab.
- In the Style name field, click the
configuration icon. - Select the Script Expression tab.
- Select a variable or attribute.
- Enter the JavaScript expression: parseInt(attribute_or_variable_name) + 1
- Click OK.
