• Reference Guide

View Document Section

The View section contains views of data stored in the Data section. A view of another view is also possible, but this option is not very practical. A view is created mainly from a table and it represents a combination of operations used for ordering, deduplicating, filtering according to a defined condition, grouping by a column, ungrouping of a nested table, joining a table, and inserting a computed column. These operations are applied to one or more base tables. The created view selects and groups data from the base tables and continuously displays the current state as data in the base tables change.
Working with the View section is mostly analogical to the Data section. The easiest way to create a new view is copying an item from the Data section to the View section, or using the Save View command in the table context menu. Every presentation of the table creates a local view – and this view can be thus saved to the View section where it can be further edited. You can also use the new view item to create a new view, but a view data type is relatively complicated, so it is inconvenient to construct a view this way (technically speaking, a table view is an instance of the inferred sequence type).
From the logical point of view, a computed data item can be also regarded as a view. Consequently, if you need to continuously compute a scalar value based on the document data, it is convenient to place the computed item in the View section (technically speaking, it could exist also in the Data section, but it naturally belongs here). However, a computed item in the View section can be created only directly using the new view item. The subsequent steps are analogical to the creation of a new data item in the Data section.
Presentations of views are automatically created and displayed in the right pane in a similar manner as in the Data section. The only difference is that a table presentation in the View section does not create another local view (view of a view), but it directly changes the view stored in the section. For this reason, the Reset View command does no longer exist here, like it does in the Data section.
Properties of individual items in the View section can be found in the View Type section.

Copying items to the View section

Data section
Creates a view of the data. This operation makes sense mainly for tables because only tables have a non-trivial view. If a table has a view in the Data section (is ordered, filtered, etc.), the newly created view is identical to that one. This is useful for a quick save of a defined view.
View section
Creates a copy of the view.

Copying items from the View section

Data section
Creates data containing the instant state of the view.
View section
Creates a copy of the view.
Presentation section
Creates a new presentation of the view. The presentation is identical to the presentation used in the View section, so you can use this operation to easily create an initial presentation, which you can further modify, or, if you have already modified the presentation that had been automatically created in the View section, your modifications are saved to the newly created presentation.
A presentation created this way has a universal dispel at its top level so that changes of data types are reflected also by the structure of the presentation. If such behavior is undesirable, you can remove this root universal dispel in the dispel definition editor using the Remove intermediate dispel context menu command. The dispel definition editor is invoked, for example, by the context menu command of the respective item in the Presentation section.
If you preserve the root universal dispel, you can still modify the instant state of the presentation – the modifications made this way are preserved even if the type of the underlying data (and consequently also the appearance of other parts of the automatically created presentation) is changed.
Outputs section
Creates a text output template and hence also an output based on the presentation used in the View section. If you, for example, copy a table, the output contains the columns that were currently displayed.
Creates a text representation of the view and inserts it into the edited text. This is especially useful for tables – you can easily create a corresponding table in the text.
Moreover, you can use this technique to copy data to an external text editor outside Sfairadora.
You can also use this technique to copy to the text only several selected table rows instead of the entire table.

Context menu

For the View section items in the left pane:
Menu Item
Edit View Type
Displays a window with the view type. The command is equivalent to what you see in the right pane of the respective item in the View Type section.
Create Output Template
Creates a text output template for the view. In case of a table, the instant state of the view (filter, ordering …) as well as the presentation state are reflected. The actual text output is then available in the Outputs section. A window asking you to enter the template name appears before saving. Text output reflects changes of source data. Changes of the source table view or presentation do not affect the text output.
Create Output Text
Creates output text based on the instant state of the data. You can either save the resulting text to the Data section or create a new text document. Before the text is created, a window appears, in which you can specify the name of the saved text or its location. The created text is independent of changes of the source table data or view.
Open in Window
Opens a separate window and displays in it the respective data, which would otherwise be displayed in the right pane. The same is achieved by double-clicking the item.
Reset Presentation
If modifications to the data presentation have been made, they are revoked, and the original automatically created presentation of the data is restored.
Edit Presentation
Opens the dispel definition editor to edit the automatically created data presentation.
Save Presentation
Saves the presentation into the Presentation section. This operation is equivalent to copying the item to the Presentation section.
The context menu of the right pane contains some of the commands listed above. If the right pane displays a table, which is the most common case, most of the context menu commands refer to the table.