Dashboard Macros

Dashboard macros are useful for inserting the names of changing workspace elements into dashboard text or for embedding web content in dashboards that exhibit dynamic behavior. The macros act as placeholders that are automatically replaced by dynamic workspace values.

You can use macros in the URLs of embedded web content widgets and, in some cases, dashboard text boxes.

You can use dashboard macros as part of an effort to add dynamic images to your workspace (see Adding Dynamic Images to Your Workspaces).

Supported Macros

See Dashboard Macro Reference.

Where You Can Use the Macros

Embedded Web Content Widgets

When used in iframe URLs, the dashboard macros can pass workspace parameters, such as the current value of a dashboard filter, to another web page that embeds a GoodData dashboard. The macros can also be used for synchronizing aspects of two dashboards where one dashboard is embedded within another.

The URL in an embedded web content widget where a macro is used is your workspace URL except for the VARIABLE_VALUE macro that must refer to the URL of the GoodData’s Amazon S3 bucket (see VARIABLE_VALUE).

For more information about how to add a web content widget to a dashboard, see Creating a Dashboard.

Dashboard Text Boxes

In some cases, you can also use the macros to insert dynamic workspace values into dashboard text boxes (headline, sub-headline, description).

For more information about how to add a text box to a dashboard, see Creating a Dashboard.

Macro Syntax

A dashboard macro is surrounded by percent symbols (%).

For example, the macro that represents the URL of the currently used domain looks like this:

%HOST_NAME%

For more information about the supported macros, their syntax and parameters, see Dashboard Macro Reference.

Example: Embed the Current Domain

When used in a web content widget, the following URL embeds the currently selected domain (see HOST_NAME):

https://%HOST_NAME%

Example: Display the Currently Selected Values of a Variable Filter

When used in a web content widget, the following URL displays the values that are currently selected in the associated variable filter (see VARIABLE_VALUE):

https://s3.amazonaws.com/gd-images.gooddata.com/customtext/magic.html?text=%VARIABLE_VALUE(assNNkQ0ZefWf)%

Example: Display the Currently Selected Value of a Date Filter

When used in a text box on a dashboard, the following URL displays the start date of the time range selected in the associated date filter (see DATE_FILTER_VALUE):

%DATE_FILTER_VALUE(closed.date,FROM)%