Data Table Editor

Top  Previous  Next

The Data Table Editor (DTE) is a component used to edit or view a single Data Table. It is used by the Properties Editor to edit context variables, by the Event Log to view Data Tables associated with events, by the Edit Data UI Procedure to edit function input parameters and view its output, etc.

cl_dte

Most elements of the Data Table Editor, column headers and data cells usually have tooltips which pop up when the mouse hovers over the element.

The tooltip for the column header contains the help string specified in the table's Record Format, if any.

The tooltip for a cell contains a string representation of the cell's value, and the type of field used for this cell. For example, it may be useful:

If a cell's value too long to fit into the cell itself,
If the cell editor has selection values and you want to see the value itself, not its description from the drop-down box.

note_tip-wt

If cell tooltip provides some important extended information, the cell is marked with a small blue triangle:

cl_dte_tooltip

Table columns can be resized and reordered. To resize a column click on its margin and drag the mouse to left or right. To change column order, drag the column header and drop it in a new location.

Double-clicking the separator between headers of two columns will auto-fit the left-hand's column width (i.e, resize it to fit everything in it).

Data Table Editor Modes

Data Table Editor may work in two modes:

Normal mode
Read-only mode

In the read-only mode editing is disabled.

There are also two data presentation modes:

Multiple records mode
Single record mode

In multiple records mode, the table header shows the description for every column, and every row represents one Data Table record:

cl_dte_normal

Single record mode is used by the DTE when the table being edited contains just one record, and no extra records may be added. This mode features a two-column layout: the left column shows field names, and the right one contains values:

cl_dte_vertical

Editing Data

If the DTE is in the normal (editable) mode, the values within the table may be changed. The format used for a given cell depends on the Record Format.

There are some special cases when non-standard editors are used:

If the field is declared as Nullable and its value is NULL, it is shown as <Not Set> in DTE. Click the cell to start editing and set a value for it. You can reset the value back to NULL using the Reset to Default operation in the cell context menu.

cl_dte_null_edit

If a field format contains selection values, editing is performed using a drop-down box:

cl_dte_drop_down_edit

Integer, Long, String and Float values are edited in a normal text field:

cl_dte_text_field_edit

Sometimes String values can be alternatively edited in a Text Area editor that is shown in a separate window:

cl_dte_text_area_edit

Another option for editing String values is the more advanced Text Editor. It is used when a String field contains Java code, XML document or other text data suitable for syntax highlighting.

Boolean values are edited using checkboxes and are represented by Yes (for TRUE) or No (for FALSE) in read-only mode:

cl_dte_boolean_edit

Date and Date/Time values are edited using a Date Picker:

cl_dte_date_edit

Data Table fields (i.e. fields whose values are actually entire data tables) are edited by a nested Data Table Editor that appears in a separate dialog. The dialog pops up when you click in the cell containing the embedded Data Table:

cl_dte_datatable_edit

Colors are selected using a Color Picker component:

cl_dte_color_edit

Data Block fields may contain images, sounds or generic files.

Files, sound and images are inserted into the cells using a File Selector component:

cl_dte_file_edit

Images contained into the Data Table are displayed as a thumbnail (see previous screenshot).

Sounds can be played back directly from the table cell:

cl_dte_sound_edit

Context paths and context masks are specified using a context mask selector component. It looks like a usual text field with a button on the right:

cl_dte_context_mask_edit

When editing the path/mask, you can press Space to get list of contexts that may be appended to the currently edited mask. Choose a context from the drop down list to append it to the current mask:

cl_dte_context_mask_sel

Pressing the [...] button opens an Entity Selector component to allow selecting the mask by pointing and clicking.

Much like context masks, expressions are edited in a text field with a [...] button that opens an Expression Builder to allow creating and validating an expression in point-and-click mode.

Context Menu

The context menu in the Data Table Editor contains several operations:

Copy

Copy the value of a cell.

Paste

Paste a value from the clipboard into a cell. If the value in the clipboard has another format than the cell value, AggreGate Client will attempt to convert it. If the value cannot be converted, it will not be pasted.

Reset changes

Reset the cell value to the one it contained when the Data Table Editor was opened. If the cell didn't exist when the editor was opened (i.e. the cell belongs to a newly created row) this operation will reset its value to default (see below).

Reset to default

Reset the cell value to the default for this column (usually defined on the server, as part of the record format description).

Reset table to original state

Resets all changes made to the table since it was opened.

When the Data Table Editor is being used to modify the value of a context variable (as opposed to raw data coming from another source), the context menu within the editor contains additional actions related to this variable.

Sorting and Filtering

note_warning-wt

Sorting and filtering do not change or reorder the actual data in the table, but only its visible presentation.

Sorting Data

You can sort the rows of a Data Table being edited or viewed. To enable sorting, click the column header. Clicking a header already used for sorting will reverse the sorting order.

Filtering Data

Another convenient feature is data filtering. To enable filtering, enter filter text in "Filter:" text field and press Enter. Table contents will be filtered to show only rows where at least one field matches the filter.

There are three modes of filtering. Filtering mode is selected by consecutive clicking on an icon next to the filter text field:

dte_filter_text

Plain Text

Only records that contain the exact filter text in any fields are shown.

dte_filter_regexp

Regular Expression

Filter text is treated as a regular expression. For example, you can enter ^test in the filter text field to filter out only the rows where one of the fields begins with "test".

dte_filter_expression

AggreGate Expression

Filter text is treated as a AggreGate expression. It may refer field values using references. For example, if you are viewing a processor load summary for different devices, {cpuLoad} > 20 && {cpuLoad} < 50 expression may help to filter devices with an average CPU load.

Fill Down Feature

If the the Data Table Editor is working in multiple records mode, you can change the value of all cells in any column at once. To activate Fill Down, right-click the header for the desired column. A Fill Down window will pop up:

cl_dte_fill_down

Enter or edit the value in the popup window and click the Fill Down button to write this value to all cells in the selected column. Click Cancel to abort the operation.

Toolbar

The Data Table Editor toolbar provides access to the operations that may be performed with the data table.

dte_add_row

Add Row

Insert a new row before the currently selected one. If no row is selected, a new row is added to the end of table. This button is disabled or hidden if rows may not be added to the table.

dte_remove_row

Remove Selected Rows

Remove the currently selected row(s). This button is disabled or hidden if rows may not be removed.

dte_row_up

Move Row Up

Move current row up. This button is not shown if rows may not be reordered. It changes actual data in the table (in contrast to the sorting operation, which merely changes how the data is shown.)

dte_row_down

Move Row Down

Move currently row down. This button is not shown if rows may not be reordered. It changes actual data in the table (in contrast to the sorting operation, which merely changes how the data is shown.)

dte_reset

Reset Changes

Undo all changes that were made to the table. This button is enabled only after a change is made.

dte_enable_hscroll dte_disable_hscroll

Enable/Disable Horizontal Scrolling

If horizontal scrolling is disabled, width of all columns is adjusted automatically to fit the width of Data Table Editor window. If scrolling is enabled, Data Table Editor has a horizontal scrollbar and width of all columns is adjusted to fit their contents. This option is disabled by default.

dte_import

Import Data Table

Imports data from a file.

dte_export

Export Data Table

Exports data to a file.

dte_report

Make Report

Generate a report based on the table being edited or viewed.

Some (or even all) toolbar buttons may be hidden or disabled if their respective operations are not available in the editor. A button is hidden if the operation is not applicable to the current table at all. If an operation is simply not available at the moment (e.g. the Remove Selected Rows is disabled when no rows are selected), its button is disabled.

Data Export/Import

Data Table Editor has embedded support for data exporting/importing from a number of well-known file formats. Here is a list of supported formats:

Extension

Description

Export Supported

Import Supported

Notes

TBL

AggreGate Native Format

Yes

Yes

Data Table is encoded according to Data Table Encoding standard and written to a file.

XML

Extensible Markup Language

Yes

Yes

Data Table is encoded according to Data Tables XML Encoding standard and written to a file.

HTML

Hypertext Markup Language

Yes

No

See example below.

CSV

Character Separated Values

Yes

Yes

User may specify a number of CSV encoding/decoding settings before export/import takes place.

XLS

Microsoft Excel

Yes

No


During import operation, data read from a file is not inserted into Data Table Editor as is. Instead, it is merged with the data currently contained in the Data Table Editor using a Data Table Smart Copy operation.

note_further-wt

Properties import procedure cannot just override values contained in the editor with ones read from a Excel file because they may have different format. But in any case the best efforts are made to import as much data as possible.

When importing data, it is possible to choose what fields will be imported. You can only import fields that exist both in the imported Data Table and Data Table currently being edited, and are writable in the table being edited:

cl_dte_imported_fields

If you are exporting to or importing from a Character Separated Values (CSV) file, you will be prompted to specify CSV encoding/decoding options.

Examples

Original Data Table:

cl_dte_original_table

The same table exported to CSV format (Header Record contains field descriptions, screenshot taken in a text editor):

cl_dte_csv

The same table exported to HTML format (as shown in a web browser):

cl_dte_html

The same table exported to XLS format (as shown in Microsoft Excel):

cl_dte_xls

Report Creation and Export/Import

When the Data Table Editor is in Multiple Records Mode you can generate a report, based on the data being viewed or edited. Click the Make Report button on the toolbar and specify options for the report:

cl_dte_report_options

When you click OK, AggreGate Client generates a report design, fills it with the data from the editor, and opens the generated report in a Report Viewer. You can then print it, or export it to PDF, HTML, CSV etc.

This is what such a report looks like:

cl_dte_report

Processing Data Bindings

The Data Table Editor handles bindings contained in the format definition of the Data Table being edited. When the editor loads, it reads the list of bindings for the table and processes them in the background. Bindings are evaluated and used to change cells in the table being edited. Binding expressions used by Data Table Editor may contain relative links to the cells of the table being edited, along with links to data from various contexts. To find out how to create these links, learn more about data bindings here.