Inserting an OTScript Code Block

You can define your own OTScript code in a template to access specific data, when the data provided in the Data tab do not fit to your need.

To define your own calculation or accessing code, you can insert a piece of OTScript code, which returns a string value to an appropriate structure element. For more information, see Structure Elements Nesting Rules.

Note: For reusable codes, you can customize the list of data methods by defining persistent methods. For more information, see OTScript Language Guide.

See Also
About Structure Elements
Assigning Styles
  1. From the Structures list:
    1. Drag the Paragraph element into the Graphical area.
    2. Drag an OTScript Code element into the inserted paragraph.
      An OTScript code is inserted in the paragraph and the pointer appears in the Code field of the Properties tab.
  2. Enter code returning a string value.

    Tip: If the code contains an error, an error icon appears on the OTScript code area and a tooltip contains its details.

  3. Optional: To format and filter the element, more options are available in the form. For more information, see Data, Structure Elements, and Instructions.

The code is inserted in the OTScript code area.