Create a new export

Create a new export

An export allows you to generate a Microsoft Excel file or an XML file populated with data from Relatics. A predefined export stores the script that specifies the desired data to be exported.

Create a new export*

  1. In the workspace menu, click on Output.
  2. Click on the menu  Exports.
  3. In the exports overview, click on  New export. As a result, the dialog New export is opened.
  4. In the dialog, for the field Name, enter a unique name that a user will recognize.
  5. In the dialog, for the field Export format, choose whether the export format should be an XML file or an Excel file, or a Relatics 5 compatible file (.xlsx).

Notes:

  • Because of Excel’s cell size limitations, some exports are only possible in XML format. These limitations can occur with large text properties or multi-cardinality relations with many elements. If such a situation arises, the user will be informed beforehand.
  • Because of Excel’s cell markup limitations, an exact copy of the original data of text properties cannot be guaranteed. An extra HTML-based column is provided in Excel that captures the full richness. HTML is the default output for text properties in XML format.
  • When choosing the Relatics 5 compatible file (.xIsx), data will be exported in a format that can be easily used in Relatics 5. 

Write the export script*

An export script is constructed by using a dedicated syntax.

To quickly create (parts of) the script syntax, Relatics offers a script generator in the overviews. To use this, apply the following steps:

  1. In the type list, click on a type element to open the corresponding overview.
  2. In the overview, select the  My view tab.
  3. In the selected view, use the model selector and filters to obtain the desired dataset.
  4. On the selected tab, click on Context menu - Relatics icon Open menu.
  5. In the dropdown menu, click on  Copy script to clipboard. As a result, the script is copied to the clipboard.
  6. Navigate to the export details by clicking on the row in the export table.
  7. In the export details, click on Edit beside the script label.  As a result, the dialog Edit query is opened.
  8. In the Edit query dialog, paste the script.

The output structure preview shows all the type elements, their type properties, and the type relations disclosed in the script.

Note:

  • An export can have multiple type elements as root iterators.

Repeated type elements with varying type properties

If a type element is queried multiple times in an export script but with varying type properties, only the values that comply with the script are stored in the output. Property values that are not supplied get the value ###Unspecified### in an Excel export and are not present in an XML export.

E.g., for each Action, the Name and Role of the Has responsible: Person relation are exported. In addition, the Name and Email of the Has executor: Person relation are exported. In the export file, the role will not be supplied for a person who is only related as an executor. So the value in Excel for these persons is ###Unspecified###, and in XML, the element will not be present.

[Action]
    {@ID}
    {Title}

    [Has responsible: Person]
        {@ID}
        {Name}
        {Role}
    [.Has responsible: Person]

    [Has executor: Person]
        {@ID}
        {Name}
        {Email}
    [.Has executor: Person]
[.Action]
* In the workspace, the user type of your user must be set to power user to enable this feature.