Open external URL

See also Open external URL (for forms) or the ribbon macro command 'Open external URL' (see Available commands).

Event action – Abstract

Purpose: This opens an external URL in the current client as a new browser tab.

images/download/attachments/62866166/image2021-2-16_18-59-49-version-1-modificationdate-1613498391247-api-v2.png

The Open external URL event action opens a URL on the current client in a new browser tab.

  • The newly opened browser tab immediately receives the focus.

  • The event handler does not wait until the called page is established.

  • As far as errors occur when opening the URL, they are displayed in the corresponding browser tab. However, they have no influence on event processing.

NOTE◄ If the event handler was triggered to a non-interactive context (e.g. Import), the Open external URL event action is ignored.

Configuration

In the URL parameter, any URL can be defined as a static text value or by Resolvers.

By default, the input field accepts direct input, which is interpreted internally as a parameter for a Resolvers for static text (see Static values).

Clicking on the gray arrow at the bottom left of the input field makes the Resolvers visible, so that they can be edited or replaced by other Resolvers:

images/download/attachments/62866166/image2021-2-16_19-0-34-version-1-modificationdate-1613498436484-api-v2.png

Examples

Simple use case

Within an event handler, under certain conditions, a static defined URL should be opened, occupying a new browser tab next to the current client session:

Configuration:

images/download/attachments/62866166/image2021-2-16_19-1-33-version-1-modificationdate-1613498496013-api-v2.png

NOTE◄ The prefix for the http protocol (http://) must be explicitly included in the URL. It is not added automatically!

If the value in the URL parameter does not start with an abbreviation for a protocol, then the URL is resolved relative to the path of the Lobster_pro client, so that for example documents can also be displayed that were uploaded to the web folder via the File manager:

images/download/attachments/62866166/image2021-2-16_19-2-44-version-1-modificationdate-1613498566928-api-v2.png

images/download/attachments/62866166/image2021-2-16_19-3-29-version-1-modificationdate-1613498611302-api-v2.png

Other content that is available relative to the client path can also be accessed. The following call opens an overview with technical information about the Lobster Data Platform / Orchestration installation used:

images/download/attachments/62866166/image2021-2-16_19-4-40-version-1-modificationdate-1613498682768-api-v2.png

More complex use case

Using a Custom action event, a ribbon button is to address the search function of a company website (here: www.lobster-world.com) in the language of the Lobster Data Platform / Orchestration session and, to this end, allow the user to enter a search term in advance.

The Lobster homepage supports this access via the following syntax: www.lobster-world.com/<language>//?s=<searchText>.

  • The <language> placeholder must be replaced with a two-character abbreviation for one of the languages supported on the website, e.g. 'de' for German or 'en' for English.

  • The term to be searched for must be passed as the value for the s URL parameter.

Configuration:

In this case, the value for the URL parameter is to be defined 'dynamically' by the configuration on the right at runtime:

  • For the URL parameter, a value resolver of the Concat strings type is used first, in which the contents to be concatenated can be defined by direct input or via other Resolvers.


  • The base URL is entered directly here including the protocol prefix as static text: http://ww.lobster-world.com/


  • The following is a Current locale value resolver that should return the two-digit identifier for the Locale. The Locale without country option is intended to ensure that any country-specific versions of a locale (e.g. en_us or de_ch) used in Lobster Data Platform / Orchestration are separated.


  • The transition from web address to the parameters is again defined as static text (//?s=).


  • The search term itself is queried by the user through a User prompt value resolver, so that a dialog with a text field appears at runtime. The parameters used for this can be seen on the right:

    • In Title – purely informative – the called website is named.

    • The Prompt is obtained from a Localization entry not specified here.

    • The Timeout (s) is set to the value 0 so that the dialog is displayed to the user without a time limit.

NOTE◄ The configuration for this example does not provide any content requirements for the User prompt, in particular 'no value' is also accepted as input. Accordingly, the search function of the website is used even if the user has not entered a search term. A corresponding case distinction, if necessary in connection with the option Cancel enabled, was deliberately omitted here in favor of a more compact representation.

images/download/attachments/62866166/image2021-2-16_19-6-37-version-1-modificationdate-1613498799563-api-v2.png

Runtime example:

images/download/attachments/62866166/image2021-2-16_19-7-28-version-1-modificationdate-1613498851144-api-v2.png

Within a login that uses the login language 'German', entering the search term 'dmz' results in the URL shown in the upper right corner.

NOTE◄ The actual search results obtained with this search term may, of course, differ from the status recorded here, as may the design and functionality of the website.

images/download/attachments/62866166/image2021-2-16_19-11-0-version-1-modificationdate-1613499063042-api-v2.png