Sfairadora

  • Reference Guide

Grouping by Column

This operation allows you to group rows in a view by values of a selected column. The resulting table contains one row for every value that occurs in the required column (all duplicate values are removed). In each row (for each value), a subordinate table appears including all rows that have the respective value in the required column of the source table. The grouping operation is performed by selecting the Group by column command from the context menu of the column.
Example:
City
Name
Score
Paris
Adam
21
London
Barbara
33
London
Carol
15
Paris
Daniel
43
London
Elizabeth
18
Paris
Frank
28
Result of grouping by City:
City
Group
Name
Score
Paris
Adam
21
Daniel
43
Frank
28
London
Barbara
33
Carol
15
Elizabeth
18
A table can be grouped by multiple columns at the same time. To do this, select the columns by which the table should be grouped by clicking the column headers while holding down the Ctrl key. If, for example, you select two columns, the resulting outer table will include pairs of values while the subordinate table will include rows where the respective pair occurred.
Grouping can be canceled by the inverse ungroup operation.
Grouping is realized through the creation of a subordinate inferred sequence (subordinate table view). A filter is applied to the subordinate table to ensure that it contains only the relevant rows. If you change this filter, the contents of the subordinate table will, of course, change as well. In order to create the filter, the subordinate table contains all columns of the source table. However, the columns by which the table is grouped are hidden, because they always contain the same value as the row in the parent table.
A table can be grouped also by a computed column. Further it is possible to ungroup a subordinate table and to group the result by another column. For example, suppose we have a table of products with a table of customers in a subordinate table. This subordinate table can be ungrouped and subsequently grouped by customer names so that now we get a table of all customers together with a list of products ordered by every customer.

Inserting and Moving Rows in a Grouped Table

If you insert a row into the inner table of a grouped table, a new row is inserted into the source data table; in this new row, the column by which the table is grouped obtains its value from the parent table row. In the above example, if you insert a new row {“Gabrielle”, 100} into the table subordinate to “London”, the new row inserted into the source table is {“London”, “Gabrielle”, 100}. If you drag, in the view, a subordinate table row from the “London” group into the “Paris” group, the “London” value changes to “Paris” in the respective row of the source table.
These functions can be visually explored by simultaneously displaying the data table and its view according to the following steps:
1.
Create a data table and group it by City.
2.
Save this view to the View document section (e.g. by dragging it with the mouse to this section).
3.
Open the saved view in a separate window by double-clicking the created item.
4.
Display the original data table. Invoke the context menu by a right click and select Reset View.
5.
Changes you make in the view opened in the separate window will be immediately applied to the data table.