2022 April Release

Control FSCDATATABLE@1.1001:ControlDataTable Permanent link for this heading

This control displays data as a data table and includes features for bar charting, vertical and horizontal grouping and subgrouping. This control supports the controloptions expression in the layout of a form page.

Example:
controloptions = expression {
  "fscdatatableconfig: {param1: 'value1', param2: 'value2'}"
}
Possible parameters for fscdatatableconfig are described in the following list.
  • indexval (int)
    Defines the zero based index of the value in the dataset. Default is 4.
  • indexh (array)
    Defines the zero based index of the horizontal grouping values in the dataset. The first index in the array identifies the column group, the second index identifies the column name. Default is [0,1].
  • indexv (array)
    Defines the zero based index of the vertical grouping values in the dataset. The first index in the array identifies the row group, the second index identifies the row name. Default ist [2,3].
  • visibilityhorizontal (array)
    Defines which row group labels should be visible for the user. Each value in this array has to be Boolean. First value identifies the visibility of the row group label, second = row name. Default is [true, true], although the column group labels are only displayed if there is no data to display. Otherwise the column group labels are not displayed.
  • visibilityvertical (array)
    Defines which column group labels should be visible for the user. Each value in this array has to be Boolean. First value identifies the visibility of the column group label, second = column name. Default is [true, true], although the column group labels are only displayed if there is no data to display. Otherwise the row group labels are not displayed.
  • xaxis (string)
    Defines the text for the x-axis. Default is an empty string.
  • yaxis (string)
    Defines the text for the y-axis. Default is an empty string.
  • tablelabel (string)
    Defines the description text for the left upper corner of the table. Default is an empty string.
  • debug (Boolean)
    Activate or deactivate the debug mode. Default is false.
  • displaychart (Boolean)
    Activate or deactivate the rendering of charts. Default is true.
  • alternatecolorsubgroup (Boolean)
    Activate or deactivate the color alternating for subgroups. Default is true, but will be automatically false if group columns exist.
Example:
// If you have multiple groups for both columns and rows you can specify them
// in your dictionary
expression {
  DataTableList[] @tableentries = null;
  @tableentries += {
    dtrowgroupname = "rowgroup 1",
    dtrowname = "row 1",
    dtcolgroupname = "colgroup 1",
    dtcolname = "col 1",
    dtvalue = 1
  };
  // … further data …
  return @tableentries;
}
// Control configuration
// Debug mode is enabled so you can see the debug output in the console
controloptions = expression {
  "fscdatatableconfig: {" +
    "xaxis: \"X-Axis Text\"," +
    "yaxis: \"Y-Axis Text\"," +
    "tablelabel: \"Table Label\"," +
    "debug: true,"
    "alternatecolorsubgroup: false" +
  "}"
}
For displaying a vertical bar chart, it is possible to use so called special fields. In this case the row in the dataset should like the following:

Example:
expression {
  DataTableList[] @tableentries = [];
  @tableentries += {
    dtrowgroupname = "rowgroup 1",
    dtrowname = "row 1",
    dtcolgroupname = "<V>", // special field identifier
    dtcolname = "Unit Name", // string
    dtvalue = 1
  };
  // … further data …
  return @tableentries;
}

FSCDATATABLE@1.1001:ControlDataTable()

Additional Information