Actions

Within the configuration of Behaviours, 'Actions' can be added either to the list of Actions on 'true' or the Actions on 'false'.

images/download/attachments/189432508/image-2024-10-2_16-18-10-version-1-modificationdate-1727878690913-api-v2.png

Depending on the check result of the respective behaviour ('true' or 'false'), only the actions of exactly one of these two lists are executed.

►EXCEPTION◄ If the check result of a behaviour is determined based on the behaviour type Logical condition, no actions are executed.

The configuration of actions in a Behaviours is basically optional. Each of the two lists can therefore be empty. Then the default entry None appears in the list (see Actions on 'false' in the screenshot above).

Behaviours whose behaviour type already implies decisive 'activities' (e.g. Call profile or Dispatch custom action event (Form designer)), can be used without any actions, under certain circumstances.

Configuring actions

A click on the images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/add.svg symbol in the shaded header of a list adds an Undefined action to the end of the list (see Actions on 'true' in the screenshot above).

  • The Undefined action only becomes effective when a selection is made under Action type. This selection can then only be changed and no longer deleted.

  • Since certain actions (e.g. Set value) can only be executed in connection with suitable form elements, the Undefined action already offers the possibility to link a Target element (see section 'Linking elements' below) before the Action type is selected.

  • As soon as a selection is made for the Action type, further specific parameters for the selected action appear.

  • If the Action type is changed afterwards, existing settings for all specific parameters of the action are discarded. However, a selection for the Target element is retained, so that, for example, it is possible to switch from Show element to Hide element for an unchanged Target element.

A click on the images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/forbidden.svg symbol within a certain action removes it from the list.

The actions of a list are executed according to their sequential position 'from top to bottom', as long as no error occurs that prevents the execution of further actions.

The position of single or multiple actions within a list or between lists can be changed by drag & drop.

  • The target position is indicated by a red horizontal positional marker during the drag & drop process.

  • The drag & drop process can also be executed on a target line item in a different behaviour for the same form element, as long as it is available in the properties editor.

  • Holding the Ctrl key while releasing the mouse button creates a copy of the action instead of moving it. The 'copy mode' is visualized by the display of a [+] symbol on the mouse cursor.

For a single or multiple selection of actions, the standard key combinations Ctrl+X (Cut), Ctrl+C (Copy) and Ctrl+V (Paste) as well as the Del key are also available for deleting actions.

  • A multiple selection of actions can be created by clicking on the headers of the respective actions while holding the Ctrl key.

  • The same multiple selection can also include actions in different lists and even behaviour.

Linking elements

A target element for an action may need to be created before selecting the Action type, in order for the desired action to be available.

images/download/attachments/189432508/image2020-6-17_14-46-27-version-1-modificationdate-1727878145110-api-v2.png

  • The creation of a link is initiated by clicking on the link symbol (on the left of the No target element linked text).

  • The Target element can then be linked by clicking on it in the layout (see screenshot above) or in the tree structure ('Tree View').

  • Depending on the position of the mouse cursor, elements that can be selected with a click are marked by green shading until the link is complete (see 'Text input' in the image).

  • The link mode can also be terminated without linking by clicking the link icon again.

images/download/attachments/189432508/image2020-6-17_14-47-50-version-1-modificationdate-1727878145107-api-v2.png

  • If a link to a Target element already exists, the corresponding element in the layout is indicated by green shading when the mouse cursor points to the link symbol (as in the screenshot).

  • A click on the link symbol then removes the existing link. If another element is to be linked, starting the link mode requires a further click on the symbol.

NOTE◄ In the example, the Action type Set value was selected after the Text field was linked. This action type is only available for elements that can be assigned a value.

'For duplicates also' option

The option For duplicates also appears as a specific parameter in many actions. It is relevant if the Action type can refer to several instances ('duplicates') of an element within a Repeatable element container and the Target element is located in a Repeatable element container.

  • If the For duplicates also option is checked, then the action is executed at runtime for all 'duplicates' one after the other.

  • If the For duplicates also option is not checked, the following case distinction applies:

    • If the Target element is within the same Repeatable element container as the executing element of the behaviour containing the action, then the action is executed for the respective instance of the target element at runtime.

    • If the executing element of the behaviour is outside the Repeatable element container that contains the Target element, then the action has no reference to an instance of the target element. The action is then executed, but usually does not achieve the desired effect.

Typical applications:

The following example illustrates the typical use of the 'For duplicates also' option.

In an entry form for Shipments, the properties of certain elements at item level (in a Repeatable element container) are adapted dynamically at runtime.

images/download/attachments/189432508/image2020-6-17_14-51-1-version-1-modificationdate-1727878145105-api-v2.png

The following rules to the form shown here should apply:

  • Rule 1: For a normal shipment (with Shipment type 'Shipment') the EAN Number field can be left blank (no required field). Only then should the Goods description be considered a required field.

  • Rule 2: For the Shipment type 'ULTRA-EXPRESS' (ULTRA_EXPRESS) the EAN Number should be a required field.

Requirement

Configuration

Description

With regard to rule 1, the required field status for the 'Goods description' should depend on whether or not the 'EAN Number' is specified. Check and action affect the same position, that is, the same instance of the Repeatable element container.

images/download/attachments/189432508/image2020-6-17_14-52-28-version-1-modificationdate-1727878145102-api-v2.png

For the 'EAN Number' Text field, a behaviour is configured with the Behaviour type Filled which reacts to the Triggering event Changed (not in the image).

  • Under the Actions on 'true' the action Unset required with the Text field 'Goods description' is executed, as long as the 'EAN Number' is filled.
    The For duplicates also option is not checked, because the required field status should only be removed for the current position.


  • Under the Actions on 'false', the required field status for the 'Goods description' Text field
    is activated similar to the Set required action, if no 'EAN Number' is specified.

With regard to rule 2, the selection for the Shipment type should control the required field status for the 'EAN Number' Text field for all items, i.e. all instances of the Repeatable element container.

images/download/attachments/189432508/image-2024-10-28_9-41-12-version-1-modificationdate-1730104871694-api-v2.png

For the 'Shipment type' Combobox element at the header level of the shipment, a behaviour with the Behaviour type Filled with is configured, which reacts to the Triggering event Changed (not in the image) and checks the selection against the value specified as Input ULTRA_EXPRESS.

  • Under the Actions on 'true' the action Set required for the Text field 'EAN Number' is executed, if the shipment type 'ULTRA-EXPRESS' has been selected.
    The option For duplicates also is set, since the action should affect all duplicates of this text field in already created items.


  • Under the Actions on 'false' the action Unset required is used analogously to achieve the opposite effect if the shipment 'ULTRA-EXPRESS' is not selected.

IMPORTANT◄ Rule 2 should also be applied to items that are added after the shipment type 'ULTRA-EXPRESS' is selected. When adding items, however, the default stored in the design for the elements of the line item is always used first, in which the 'EAN Number' Text field is not a required field.

The configuration on the right ensures that when an item is added, the required field status for the 'EAN Number' is set or deleted for all items matching the shipment type, without the need to configure the dependency concerned separately.

images/download/attachments/189432508/image-2024-10-28_12-39-35-version-1-modificationdate-1730115575230-api-v2.png

For the Repeatable element container, that lists the items, the behaviour shown on the left is configured to react to the Triggering event Element added:

  • The Behaviour type Static is used with the default value 'true' (not in the image), because the Actions on 'true' should be executed unconditionally.


  • Under the Actions on 'true', the Execute behaviour action calls the behaviour described above for the linked Target element 'Shipment type' (in the header of the shipment), which is named 'checkEAN'.

Create counterpart

For certain actions, a matching counterpart can be created via a right-click on an action (or an action selection).

Example:

images/download/attachments/189432508/grafik-version-1-modificationdate-1727878145222-api-v2.png

images/download/attachments/189432508/image2022-8-9_15-20-36-version-1-modificationdate-1727878145225-api-v2.png

For the 'Deactivate element' and 'Set flag' actions, the appropriate counterparts 'Activate element' and 'Reset flag' have been generated via the context menu.
The category 'true/false' is thereby reversed accordingly.
The counterparts are inserted in the order in which their originals were selected.