Data Model pane

The Data Model Pane displays a Data Model used to help design the template, along with data. When you load data (see Loading data), the resulting record set is loaded in the Data Model pane. The information shown is the information for the current record within the record set.

It isn't possible to enter data in a Data Model directly, but you could add JSON data (see Adding JSON sample data).

Nested objects in JSON data are displayed on successive levels in the Data Model.

Filter

To find a certain table, group or field in a large Data Model, start typing characters in the Filter box. This immediately narrows down the list of displayed items to all tables, groups and fields whose name or value contains the characters that were typed. Note that the filtering is case-insensitive.

Data Model toolbar buttons

  • JSON Sample Data: Opens a dialog to load JSON sample data in the Data Model pane; see Adding JSON sample data.

    Tip: If a data field contains JSON data you could use that data as sample data: right-click the field, select Copy to copy the JSON data to the clipboard; then open the JSON Sample Data dialog and paste the data there.

  • Import Data Model: Click to browse to a file that contains a Data Model. This may be:
    • A Data Model file (*.OL-datamodel).
    • A JSON file (*.json; see the note below).
    • A Connect template (*.OL-template), data mapping configuration (*.OL-datamapper) or 'typed' JSON file (*.json; see the note below).

    The file's data model structure will be displayed in the Data Model pane without data.

  • Export Data Model: Click to browse to a location to save the Data Model file. The available file types are:
    • A Data Model file (*.OL-datamodel).
    • A JSON file (*.json): A JSON object or an array of JSON objects representing records.
    • A 'typed' JSON file (*.json).

    Note: Typed JSON follows the structure of a JSON Record Data List (see the REST API Cookbook). Data field types are determined by the schema object in the JSON.
    When a Data Model is exported to a JSON file or typed JSON file, detail tables are exported, but groups are not.

  • Collapse All: Collapse all fields on the record level, in all detail tables and in all groups.
  • Minimize/Maximize: Click to minimize or maximize the pane. See Moving and Merging Panes.
  • Data file: Hover over the button to see the name of the currently active data file. Click the down arrow and select Close data file to close the data file and remove the connection to this data file from the template.

Browsing data

When a Data Model is loaded in the Data Model Pane, it can be used to design templates by dragging fields directly into the template; see Variable data in the text.

If data is present it is possible to preview the resulting data in the template on the Preview tab (see Workspace).

You can use the following keys to browse records in the Data Model pane:

  • Page Up: next record

  • Page Down: previous record

  • Home: first record

  • End: last record.

The way the Data Model is displayed can be changed via the following options in the contextual menu. Right-click the Data Model to open the contextual menu.

  • Set Type: Use the list to select the field's data type. This may be important when using conditions based upon a field.

  • Move: Click to move the selected field in the Data Model. (See: Ordering and grouping fields in the Data Model.)

    • Top: Move the field to the first place.

    • Up: Move the field one step up.

    • Down: Move the field one step down.

    • Bottom: Move the field to the last place.

  • Collapse All: Collapse all fields.

  • Expand All: Expand all fields.

  • Copy: copy the field's contents to the clipboard.

The record can also be expanded and collapsed using the arrow icon next to it.

Tip: Right-click a field and select Copy to copy its contents to the clipboard.