Tables

Indicators

Estimated reading: 4 minutes

With the help of indicator rules, single or multiple data records of a table can be visually highlighted in the Record List. There are three options, which can be applied individually or in combination to a data record or a table row:

  • Color: Highlighting a data record using a different background color in the Record List
  • Title: Show a hint text when hovering with the mouse over the data record in the Record List
  • Object: Insert a graphic or a text as a prefix in the row of the Record List.

Indicators for a table are created in the Table Settings or for specific groups in the Table Rights. An existing group setting overrides the global settings of the table. The indicator rule is found at the traffic light.

Indicator rules must be defined in a PHP function in the extension file ./dependent/EXTENSIONS/ext_gtab.inc or a global extension file. If assigned to a table, the PHP function will be run once for each record.

Indicator rules can also be applied to the calendar. Therefore, appointments can be created with different background colors or individual symbols can be added.

PHP Function for the Definition of Indicator Rules

  • Any function name
  • The following parameters are needed to define an indicator:
    • Table ID (in the example function: $gtabid)
    • Record ID of the table (in the example function: $i)
    • Array containing all data records of the table (in the example function: $gresult)
  • A return value ‘false’ hides the data record in the Record List of the table. It is still included in the number of found records. It will also be displayed in the Record View (view or edit mode), when scrolling forwards or backwards.
  • Use Row background color by setting an RGB value in the following indexed data record array (variable names according to the example function):
    $gresult[$gtabid][“indicator”][“color”][$i][1] = $RGB;
  • CSS-Klasse für die Ergebnis-Zeile:
    $gresult[$gtabid][“indicator”][“class”][$i] = “my-css-class-to-indicate-something”;
  • Use the note text by placing a text in the following indexed record array (variable names according to the example function):
    $gresult[$gtabid][“indicator”][“title”][$i][1] = $text1;
    $gresult[$gtabid][“indicator”][“title”][$i][2] = $text2;

    If several texts are displayed together, the order of the texts is set according to their order in the function.
  • Add a graphic object or text to be displayed at the beginning of a table row, by placing a text or a graphic in the following indexed record array (variable names according to the example function):
    $gresult[$gtabid][“indicator”][“object”][$i][2] = $grafik;
Share this Doc

Indicators

Or copy link

CONTENTS