Statements editor
For components Statements and Layer statements a specialized editor is available. It allows statements to be defined using the JSON format.
Editor location
The statement editor is available in the Basic properties components Statements and Layer statements.

Figure 1. Placement of the statement editor
The editor is opened by clicking Add statement.
Editor preview
Opening the statement editor slides out a drawer presenting the area for entering text in JSON format. For a newly created component, it contains only curly braces with no content. Line numbers are visible on the left side of the editor.
The statement editor can be displayed in read-only mode and in edit mode. Read-only mode allows only viewing the saved values.

The editor underlines both semantic and syntax errors in real time. When you hover the mouse over the red underline symbolizing an error, a tooltip displaying its content is shown.

Editor behavior
The statement editor supports syntax suggestions. After pressing the key combination Ctrl + Space a suggestion is displayed containing the fields that can be entered depending on the current cursor position in the editor. Selecting one of them and pressing Enter inserts the given suggestion into the editor.

The editor can be closed in two ways. The first is the symbol X located in the top right corner (visible in Figure 2). The second way is to click outside the editor area.
Available fields
The statement editor accepts the fields listed below. Their meaning will be explained in the next paragraph. Required fields are additionally marked:
Field meanings
items
List of defined statements to display.
textContent
An artifact with the statement content displayed below the title specified in titleKey. If the artifact is specified and the key titleKey and the control defined in controls, the textContent content will not contain a control.
textContentUnexpanded
An artifact with the statement content displayed when the statement is collapsed.
mid
Business identifier of the given statement.
visibleCondition
Conditions under which the given statement is to be displayed. If the condition is empty or invalid, the value "true" will be evaluated.
styleName
Style name.
expandableCondition
Condition for which the expand/collapse text for the statement content should be displayed next to the statement title. If the condition is empty or invalid, the value "false" will be evaluated. Note: if titleKey is undefined, the text will not appear.
expandedCondition
If expandableCondition is set to "true", the property expandedCondition determines whether and when the statement content should be expanded by default. If the condition is empty or invalid, the value "true" will be evaluated (content expanded).
titleKey
The title key of a single statement defined in the tab Translations. Variables are resolved in the keys.
nativePopupTitleKey
Title key of the native popup that appears when clicking "More" → this text can be overridden by i18n.statements.item.native.more in the tab Translations. The popup is shown only in the native app. If nativePopupTitleKey is not defined, the value of the key will be displayed as the title titleKey.
event
Event that should be added if an action on the request has been defined and is associated with a given statement item.
controls
List of defined controls for the given statement. An explanation of the object fields is below. controls is below.
Defining a list of controls (controls)
mid
Business identifier of the control (required field).
titleKey
Title key displayed next to/above the control.
visibleCondition
Conditions under which the given control should be displayed. If the condition is empty or invalid, the value "true" will be evaluated. Example conditions: "js:true/false" or "js:getValue("GesComplexComponent4.GesCheckbox2")=="true".
requiredCondition
Condition for which the control should be required. If the condition is empty or invalid, the value "true" will be evaluated.
type
Control type: RADIO - a statement with two YES/NO radio buttons (other types such as CHECKBOX may also occur according to the JSON definition).
notSelectedErrorTextKey
Translation key overriding the text "You have not made a selection".
requiredNotAcceptedErrorTextKey
Translation key overriding the text "Acceptance of the selected statement is required".
styleName
Style name.
mastercheckbox
Master checkbox ID.
Last updated
Was this helpful?
