Reload element data

Actions – Abstract

The Reload element data action updates the data in the linked Target element with a possibly changed state in the background (e.g. via Client workflow).

The Reload element data action updates the data in the linked Target element with a possibly changed state in the background (e.g. via Client workflow).

images/download/attachments/189432818/image-2024-10-7_12-25-31-version-1-modificationdate-1728296731345-api-v2.png

  • The action appears under Action type only if a Target element is already linked.

Example

A portal compiles certain information about the current session in a Column layout container that is to appear as a 'footer' embedded in other forms (see Embed forms (Sub-forms)).

At runtime, a Check box element in the footer should allow you to select whether the ID or the name should be displayed for the Role of session and the User of session.

Runtime example:

Mode

View at runtime

Display of name (default)(Checkbox 'Display IDs?' blank)

images/download/attachments/189432818/image2020-6-26_18-42-40-version-1-modificationdate-1728296571533-api-v2.png

Display of IDs (Checkbox 'Display IDs?' set)

images/download/attachments/189432818/image2020-6-26_18-43-23-version-1-modificationdate-1728296571535-api-v2.png

Configuration:

images/download/attachments/189432818/image2020-6-26_18-44-24-version-1-modificationdate-1728296571538-api-v2.png

  • The hierarchy in the Tree View (left) illustrates the hierarchy in the Column layout container 'Session details', which contains the Text field elements 'Client/User agent' and 'Host', and combines the fields 'Role of session' (here: data field role) and 'User of session' (here: data field user) in a child Column layout 'Login'.

  • In the layout, the Column layout container 'Login' appears highlighted with a green frame. Next to it, the Check box 'Show IDs?' is marked with a red frame.

images/download/attachments/189432818/image-2024-10-7_15-20-1-version-1-modificationdate-1728307201421-api-v2.png

For the Check box 'Show IDs?' the behaviour shown on the left is configured, which controls the switching for the display in the fields 'Role of session' and 'User of session':

  • The behaviour reacts to the Triggering event Changed with the Change type 'Exclusively by user'. Since the data field for the checkbox is set to 'Skip', other change types are not relevant here.


  • The Behaviour type Client workflow receives (by default) the $input as a variable value. The Triggering event Changed returns the value true if the checkbox was set, otherwise it returns false. The workflow (see below) can use this variable to distinguish which data is displayed.


  • The element link to the Column layout 'Session details' transfers the data of the entire container to the workflow via the predefined variable formData.


  • The Actions on 'true' are executed if the workflow is executed without errors (i.e. without being terminated by a Abort). Here the action Reload element data is executed with the Column layout 'Login' (green frame in the layout screenshot above) as a Target element. At runtime, only the text fields 'Role of session' and 'User of session' are updated. This ensures that only the relevant values are transferred to the portal, even if the data of the entire row was transferred to the workflow.


  • There are no Actions on 'false' because the Abort is not used in the workflow.

The workflow itself is accessible via the Edit button. It uses a Static rule (with the setting 'true'; not in the image) as the only check, so it is always executed:

images/download/attachments/189432818/image2020-6-26_18-49-41-version-1-modificationdate-1728296571551-api-v2.png

  • The reference to the formData variable is established by an Execute with event action. All further Event actions are executed in this context.

  • The case distinction via If then else event action checks the state of the checkbox 'Show IDs?' passed by the variable value by means of a Variable rule.

  • If the value is true, IDs for user and role should be displayed. The data fields role and user of the formData are then populated by Set value with the respective ID values from the 'Session information' object, which is provided by the Session information resolver.

  • If the value is false, the names for user and role should be displayed. The data fields role and user of the formData are then populated by Set value with the respective field value from the 'Session information' object, which is provided by the Session information resolver.