Open portal

Actions – Abstract

The Open portal action opens the specified portal.

images/download/attachments/189434918/image-2024-10-17_11-57-25-version-1-modificationdate-1729159045036-api-v2.png

The action Open portal opens a specific portal taking into account extensive configuration options, which are explained in detail in the following sections:

Section

Subject

Selection of the portal to be opened

Target element and/or drop-down selection (under Action Type)

Data assignment to the opened portal

Behaviour data ($input) or option With empty data

Parameters for opening the portal

  • Only one instance, Modal, Full size/Size changeable, Closable

Processes when closing the portal

  • Execute behaviour after closed (possibly with the return data from a Request close action)

Configuration

Selection of the portal to be opened

►IMPORTANT◄ On one hand, the portal to be opened must exist and have been published at least once. On the other hand, it must also be assigned in context at the time of calling with the effective permissions of the current session (see Association criteria, Company authorizations). Otherwise, the action is cancelled with an error ('Portal not registered'), which can only be tracked in the developer console of the browser. However, the following actions may still be executed.

images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/warning.svg CAUTIONimages/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/warning.svg If a portal is assigned a new Portal name, the references are not automatically updated.

There are two methods for defining the portal to be opened, which if necessary can also be used in combination:

  • If a target element that returns a text value at runtime is linked for the action, this value is used as the name of the portal to be opened.

    • The name must be case-sensitive and correspond exactly to a portal name.

    • If there is no access to a portal with the specified name at runtime, the action is canceled (see ►IMPORTANT◄ above).

  • If no target element is linked or if the linked Target element does not return a value ($null) at runtime, the optional static definition of a portal in the configuration of the action is evaluated:

    • The unlabeled combobox below Action type offers a selection of all portals that have read access for configuration in the context of the session.

    • Whether Association criteria are assigned to these portals and whether these criteria are currently in effect does not influence the dropdown selection.

    • However, at runtime, the specified portal must be 'accessible' if it is to be opened, otherwise the action is canceled (see ►IMPORTANT◄ above).

►NOTE◄ In contrast to other configuration elements, each 'portal name' must be unique in the system. Association criteria (and their visibility in the context of a session) therefore controls access to a portal that is uniquely targeted. A choice between the alternatives, such as when addressing a view via the specified context (see Open view (Form designer)), is not important.

Data assignment to the opened portal

The opened portal is assigned the following behaviour data ($input) by default. Unless more specific mechanisms are required, the Validate element behaviour type allows the preparation of an 'assignment' of (valid) element data from the current form to the opened portal.

  • The option With empty data should be set urgently if a portal is to be opened reliably without data assignment. For example, if a behaviour for a Button combines the Click triggering event with a Static behaviour type to execute the action Open portal, the default value true (as $input from Button) would be assigned to the open portal as form data without this option, which can cause undesired effects.

Parameters for opening the portal

Parameter

Effect

Only one instance

Setting the Only one instance option causes the action to check at runtime whether an instance of the targeted portal is already open in the current session.

  • If this is the case, no additional instance of the same portal is opened.

    • Instead, the already open instance is assigned either 'empty data' (option set) or the current behaviour data (option not set), depending on the With empty data option.

    • If the action uses the parameter Execute behaviour after closed (see below), a corresponding 'flag' is registered for the existing instance. When closing, all registered behaviour calls are processed, even if the same behaviour is executed several times, for instance because a Button for opening the portal was pressed multiple times.

  • If no instance of the portal exists yet, a new one is opened.

If the Only one instance option is not set, a new separate instance of the portal is always opened.

Modal

Setting the Modal option activates a number of dependent parameters (identified in this table by the preceding symbol '└' in the column header) and otherwise has the following effect:

  • The targeted portal is always reopened as a new instance without considering the option Only one instance, but does not occupy a separate view slot, but is 'overlaid' in the context of the current one.

  • The instance is treated as a 'modal window' within the view slot, which means that no activity outside the portal is allowed until the instance is closed. However, the view slot can be closed together.

  • In the ribbon menu of a 'modally' opened portal, the ribbon button Back (with the symbol '<') is displayed, which can be used to close the portal to return to the calling form.
    NOTE◄ A behaviour specified via the parameter Execute behaviour after closed is executed. However, this behaviour is not assigned any data from the portal.

Without the Modal option, each open instance of a portal occupies a separate view slot.

└ Full size

The Full size option has the effect that a 'modally' opened portal uses the entire area of the current view slot when opened and hides the calling form.
If this option is deselected, additional settings for the size are displayed (width, height, minimum width and minimum height). The specifications are to be given in pixel measure.

└ Closable

The Closable option determines whether or not the 'X' symbol for closing the portal appears in the window title of the 'modally' opened portal.

  • The 'Close' by clicking on this symbol is interpreted as a click on the Back ribbon button (with the symbol '<').
    NOTE◄ Here, a behaviour specified via the Execute behaviour after closed parameter is executed. However, this is not assigned any data from the portal.

└ Size changeable

The selection for Size changeable determines whether and, if so, in what respect (height/width) the user may change the window size of a 'modally' opened portal.

  • If the Full size option is set, any selection for Size changeable is ignored.

Processes when closing the portal

The optional parameter Execute behaviour after closed, allows you to select a behaviour configured for the calling form element.

  • This behaviour is executed when the window with the targeted portal is closed.

  • The details described apply depending on the options Only one instance, Modal and Closable.

IMPORTANT◄ Data from the open portal is only transferred on to the 'Behaviour after closed' if the action Request close is executed there with the corresponding input data.

Example

Objective

In a 'Schedule meeting' portal, participants in the scheduled meeting are to be defined by adding the data of existing Lobster Data Platform / Orchestration Users to a Data grid ('Attendee list') as new rows:

  • To select the attendees, click on the 'Search' Button to open a specific search portal modally (see red arrow).

  • Via the 'Search profile' Combobox the calling portal offers two alternative methods ('Username' or 'Username OR name 1-3') for selection. Each selection corresponds to a search portal whose portal name is stored as a static key value.

  • The selected search portal offers 'matching' Users to click on in a Data grid taking into account a search text from the calling portal ('... contains ...') (see green arrow).

  • When you click on one of the users found in the search portal, it is closed and the corresponding entry is added to the 'List of attendees' in the calling portal (see orange arrow).

  • It should also be possible to end the search without making a selection by clicking the 'X' symbol at the top right of the modal window.

images/download/attachments/189434918/image2020-5-18_15-57-52-version-1-modificationdate-1729157243847-api-v2.png

Configuration

In the following, only the configuration for components directly related to the Open portal action is described in detail.

Behaviour when calling the search portal:

images/download/attachments/189434918/image2020-5-18_15-38-11-version-1-modificationdate-1729157243875-api-v2.png

  • For the 'Search' Button, a 'userSearch' behaviour is set up that reacts to the Triggering event Click (red arrow).

  • The Behaviour type Validate element is applied with the Column layout element (#9), which contains the Text field for the search criterion with the label '... contains ...' (green box, green arrow). This makes the relevant element data available in the portal opened by the action below. Here the Text field was assigned the data field criterion, which is also used in the search portal (see below).

  • The action Open portal specifies the Combobox 'Search profile' as target element. This returns the name of one of the alternatively usable search portals (USER_SEARCH_SIMPLE or USER_SEARCH_ADVANCED) as a text value based on the following service configuration:

images/download/attachments/189434918/image2020-5-18_15-41-21-version-1-modificationdate-1729157243872-api-v2.png

In addition, if no selection is made, the dropdown in the configuration refers to the USER_SEARCH_SIMPLE portal as the default.

  • The option With empty data is not set so that the behaviour data (with the search criterion) is assigned to the search portal. Further details are described in the configuration of the search portals (below).

  • The portal should be able to be opened as Modal and Closable and be adjustable in width and height (see Size changeable).

  • The parameter Execute behaviour after closed refers to another behaviour 'addToList' which must be defined for the same Button ('Search') and defines the processing of the return value from the search portal (orange arrows).

Configuration in the search portal:

Only the search portal USER_SEARCH_SIMPLE is displayed here. The alternative search portal USER_SEARCH_ADVANCED has a similar structure, but uses a different condition for the Tuple search (Form designer).

images/download/attachments/189434918/image2020-5-18_15-47-1-version-1-modificationdate-1729157243870-api-v2.png

  • The Text field 'Username contains' refers to the data field criterion (matching the Text field '... contains...' in the calling portal) and is therefore filled with the same text when the portal is opened.

  • For this Text field, the behaviour shown on the right is defined, which reacts to the Triggering event Changed with all Change types. Only 'Form data loaded' is relevant here as a change category, since value changes within the form are not intended.

  • The Behaviour type Tuple search (Form designer) uses a link to the Column layout marked green in the screen. The string transferred in the Text field 'User name contains ...' is now available within the search configuration as the value of a variable named criterion (data field name of the text field). The Tuple search (Form designer) should only return data from users whose username (username) contains this value. This is achieved, for example, by the following Field restriction in the condition of the tuple search Tuple search (Form designer):

images/download/attachments/189434918/image2020-5-18_15-48-12-version-1-modificationdate-1729157243867-api-v2.png

The search result of the Tuple search (Form designer), projections for the fields ID (id), username (username), Name 1 (address.name1), Name 2 (address.name2) and Name 3 (address.name3), is assigned to the Data grid 'User' via the Grid: Fill action. Its column configuration uses the data field identifiers id, username, address_name1, address_name2, address_name3 for the corresponding columns. It is important to use an underscore instead of a dot in the three name fields, since an alias is automatically created in the Tuple search.

images/download/attachments/189434918/image-2024-10-17_11-59-54-version-1-modificationdate-1729159194358-api-v2.png

For the Data grid 'Users', the behaviour shown on the left is configured:

  • The Triggering event Item click returns the clicked entry in the grid as behaviour data.


  • Therefore, the behaviour type Static (with the default value 'true') is used here, which transfers this data to the Actions on 'true'.


  • There, a Request close action is executed, which returns the row selected in the Data grid to the calling portal.

Behaviour after closing the search portal:

images/download/attachments/189434918/image-2024-10-17_12-2-1-version-1-modificationdate-1729159321016-api-v2.png

To close the search portal, either click on a line, which triggers the Request close action with the data of the row, or click on the 'X' symbol in the window title to end the modal search portal with a selection. Then the return value is $null. In both cases, the behaviour specified in the parameter Execute behaviour after closed is executed (here: 'addToList'), for which a case distinction is recommended.

  • Here, the behaviour type Calculate by Check expression examines, whether the return value from the portal is 'empty' ($null) or not. The expression used
    $not($isEmpty($input))passes the result from the Calculation expression $input)to the Actions on 'true', only if it does not return $null, i.e. 'empty' (see Functions not (Logical negation) and ifEmpty).


  • Under the Actions on 'true', the Grid: Add row(s) action then transfers the existing row data to the Data grid linked as the Target element 'List of attendees'.


  • The Actions on 'false', on the other hand, only provide a Show alert action, which confirms to the user that the search has been canceled.