String Functions

Functions for string parsing and manipulation.

Builds a Markdown-style link for display in a dashboard table. The optional type suffix controls whether Stroom opens it in a dialog, tab, browser tab or dashboard.

link(url)➡String

Uses the URL as both link text and target.

Function Arguments:

Param Type Mandatory Default Value Allowed Values Multiple Min Count Description
url String - - - The link target.

Return Value:

Type Description
String The formatted link string.

link(title, url, [type])➡String

Uses a separate title and target URL, with optional target type.

Function Arguments:

Param Type Mandatory Default Value Allowed Values Multiple Min Count Description
title String - - - The text to display.
url String - - - The link target.
type String - tab, dialog, dashboard, stepping, data, annotation, browser - The target display type.

Return Value:

Type Description
String The formatted link string.

Examples

link('https://www.somehost.com/somepath')
> [https://www.somehost.com/somepath](https://www.somehost.com/somepath)

link('Click Here','https://www.somehost.com/somepath')
> [Click Here](https://www.somehost.com/somepath)

link('Click Here','https://www.somehost.com/somepath', 'dialog')
> [Click Here](https://www.somehost.com/somepath){dialog}

link('Click Here','https://www.somehost.com/somepath', 'dialog|Dialog Title')
> [Click Here](https://www.somehost.com/somepath){dialog|Dialog Title}

Type can be one of:

  • dialog : Display the content of the link URL within a stroom popup dialog.
  • tab : Display the content of the link URL within a stroom tab.
  • browser : Display the content of the link URL within a new browser tab.
  • dashboard : Used to launch a stroom dashboard internally with parameters in the URL.
  • stepping : Opens the stepper using the parameters in the URL.
  • browser : Opens a new browser tab.
  • annotation : Opens (and creates) the annotation using the URL parameters.

If you wish to override the default title or URL of the target link in either a tab or dialog you can. Both dialog and tab types allow titles to be specified after a |, e.g. dialog|My Title.