Reporter definition¶
Reporters are a special field type. They are filled automatically and are unlike simple fields not edited directly by the user.
Field synonyms of reporters always begin with a ?.
Warning
Changes in system settings often only take effect when a restart is carried out after closing the system settings (menu item under the button with the user name at the top right, see also introduction).
Add a reporter definition¶
You can create a new reporter definition above the list with the button Add .
This will open the reporter editor.
Alternatively, use the + button in the reporter editor:
Edit a reporter definition¶
Click the button Edit to edit a reporter definition.
The reporter editor opens.
Alternatively, a reporter definition can be selected for editing by clicking the button Load reporter in the reporter editor:
Important
Updates or new creations are only active after re-initialization in CortexAdmin.
Delete a reporter definition¶
To delete a reporter definition open it for editing and delete it with the button Delete in the reporter editor.
Important
You cannot delete a reporter if it is used in a record type!
Global variables¶
Enables the creation of globally available variables for use in JavaScript V8 code.
Reporter editor¶
The reporter editor is used to
reporter definitions.
Definition active¶
The reporter will only be taken into account when re-initializing the CortexAdmin if it is active!
Time stamp¶
Name¶
A freely selectable name for the reporter. This is used by users to identify the reporter and should therefore be as descriptive as possible.
Number¶
Reporter type¶
Defines what this reporter refers to:
Type | Description |
---|---|
s | Reporter for own record: reporter refers to fields in the record currently being viewed. |
@ | Reporter to referenced record: reporter refers to fields of a record referenced in the currently open record. |
F | Reporter for field dictionary: reporter refers to the contents of all fields of a specific record type. |
Important
Some attributes are not available for all reporter types.
Reference field¶
Trigger synonym¶
Determines which field triggers the (re)evaluation of the values to be calculated.
Trigger value¶
Defines the value that is required in the field with trigger synonym to trigger the (re)evaluation.
Source quantity from¶
The data required for the calculation of the reporter can be determined either with the help of JavaScript or by specifying a synonym.
JavaScript V8 code¶
Values of the reporter can be determined using JavaScript. Only valid JavaScript is accepted.
The following functions are available in the reporter to access CortexEngine content:
Function | Signature | Description |
---|---|---|
Information on fields | ||
HrIId | () | returns the IId of the currently loaded CortexEngine container |
HrSyn | (nPos) | returns the synonym of the nth field in the container |
HrFid | (sSyn, nPos) | returns the field (repetition) ID for the nth repetition of a field |
HrFidCnt | ([ sSyn ]) | returns the number of fields in the container or returns the number of repetitions of a field |
HrTyp | (sSyn [, sFid ]) | returns the basic field type to a synonym |
HrHasIId | (sIId24) | compares the transferred (24-digit) IId with that of the loaded container |
Read field contents | ||
HrChar | (sSyn [, sFid ]) | returns the content of the character field from the Cortex container |
HrCharJSOn | (sSyn [, sFid ] [, nTime ]) | returns the history information of a char field in the form of a JSON object |
HrDouble | (sSyn [, sFid ]) | returns the content of the character field from the Cortex container as a float number |
HrDoubleJSOn | (sSyn [, sFid ] [, nTime ]) | returns the history information of a double field in the form of a JSON object |
HrInt224 | (sSyn [, sFid ]) | returns the content of the character field from the Cortex container as a positive integer |
HrInt224JSOn | (sSyn [, sFid ] [, nTime ]) | returns the history information of an integer field in the form of a JSON object |
HrLink | (sSyn [, sFid ]) | returns the content of a reference field as a JSON object. For valid references with the elements "t" = "@", "i" = 24-digit IId and "r" = Remainder of the field content. For invalid references: "t": "!" and "c": field content |
HrLinkJSOn | (sSyn [, sFid ] [, nTime ]) | returns the history information of a reference field in the form of a JSON object |
HrAnsi | (sSyn [, sFid ]) | returns a field content, which is converted to UTF8 via the ANSI code page. |
HrRaw | (sSyn [, sFid ]) | returns a field content, this is converted directly to UTF8. |
String functions | ||
HrStrGetLen | (sStr) | returns the string length in bytes of a UTF8 string |
HrStrSetLen | (sStr, nMaxLen) | limits a UTF8 string to the transferred maximum length in bytes, taking into account the multibyte limits of the UTF8 characters |
Conversion | ||
HrTs2Dt | (nTimeStamp) | converts a timestamp into a date |
HrDt2Ts | (sDateStr) | converts a date into a timestamp |
HrStr2IId | (sIId24) | converts a 24-digit IId to 12-digit format and returns it as a UTF8 string |
HrIId2Str | (sIId12) | converts an IId from UTF8 format to a 24-character IId |
Global JS variables¶
Determines whether this reporter has access to the global JS variables.
Synonym¶
Values from fields with the synonym X are displayed as a list.
Filter¶
The result can be restricted by one or more filters. Filtering can be based on the field configured in synonym or on other fields.
Attention
The fields used for filtering must originate from the same record type as the field configured in synonym!
Return value¶
Determines what type of value is returned by this reporter. See also field types.
Target reporter field¶
Defines the synonym under which the reporter definition can be found in field listings (e.g. for unused fields in the record type editor).
Important
The synonym must not exceed 6 characters.
Export reporter definitions as CSV file¶
Selected reporter definitions from the list can be exported.
The image shows the list with all reporter definitions: (1) checkbox to select row, (2) button Export selected data as CSV
-
select the rows you want to export
-
click the button Export selected data as CSV
The CSV file will be downloaded and saved in the download folder (or the folder that was set for it in the browser).
The file name will be generated automatically and will be called #Reporter definitions.csv.
A list with the following information will be exported:
Column | Meaning | Note |
---|---|---|
ID | ||
active | Y(es) oder N(o) | |
type | options: @=reporter to referenced record S=reporter for own record F=reporter for field dictionary |
|
name | name of the reporter | |
time stamp | Y(es) oder N(o) | |
syn | e.g. synonym of the system field in Trigger synonym | |
trigger | ||
source | ||
target | ||
target reporter field |