Link to a URL

How linking to a URL works

Using drilldown to link to a URL is similar to linking to a dashboard or form. When users click on an element in the source dashboard, drilldown can open an target external website in a browser window.

Use parameters to customize target content

To customize the content that opens in the browser, you can include query string parameters with the URL that you use. You can configure a drilldown to capture a clicked or other value in the source dashboard and pass it as a parameter to the target.

As an example, you might have drilldown enabled on a table visualization. The $click.value2$ predefined token gives you access to the value in a clicked table cell. You can configure the drilldown to set a token in the target to the captured $click.value2$. On a user click, drilldown opens the target with a parameter set to the clicked value.

Configure the drilldown in the drilldown editor

You can use the drilldown editor to configure linking to an external URL. The drilldown editor also lets you include query string parameters for the target URL.

Note: To create conditional or other advanced behaviors in a drilldown, use Simple XML. An error message appears if you access the drilldown editor in panels with existing advanced configurations.

Prerequisites

Some default drilldown settings are new in software version 6.6.0. Review drilldown defaults and customization in Use drilldown for dashboard interactivity.

Steps

  1. From the dashboard where you want to configure drilldown, click Edit to open the dashboard editor.
  2. Find the panel where you are configuring drilldown. Click the additional options button and select Edit drilldown. 7.1 edit drilldown 2.png
  3. Select Link to URL.
  4. Type the full URL for the target, including an http:// or https:// prefix. Append any query string parameters to the URL. For example, use http://buttercupgames.com?product=$click.value$ to pass in a clicked product value from the source dashboard.
  5. Click Apply to apply these drilldown settings.
  6. Click Save to save these dashboard changes.

Configure the drilldown in Simple XML

You can configure a drilldown to link to a URL, pass in parameters, and create conditional linking behavior in Simple XML.

Syntax

Use the full URL for the resource that you want to show in the browser. You can add optional query string parameters to customize the content that users see.

<drilldown>
    <link>
        [target_URL]?q=$[source_value]$
    </link>
</drilldown>

When configuring a drilldown for a table with multiple columns, use the following syntax.

<drilldown>
    <link>
        [target_URL]?q=$row.[column name]|n$
    </link>
</drilldown>

Conditional linking

You might want to configure conditional linking to different targets or pass in different query string parameters depending on contextual values like search results or user clicks. To do this, add <condition> elements to the <drilldown>.

To evaluate user click locations, you can use the table field or chart series attribute in the <condition>.

You can also use a <condition match=" "> statement to evaluate contextual values and trigger linking or other actions conditionally. See Define conditional matching in Token usage in dashboards for more details.

Example: Link to different targets

This drilldown links from a table to different target URLs depending on the column that users click.

If a user clicks a value in column A, the drilldown passes the clicked field value to the URL as a query string parameter. If users click a value in column B, the drilldown passes this value to the URL.

<drilldown>
  <condition field="A">
    <link>[target_URL]?q=$[value_from_field_A]$</link>
  </condition>

  <condition field="B">
    <link>[other_target_URL]?q=$[value_from_field_B]$</link>
  </condition>
</drilldown>

Example: Use custom logic to evaluate search results

The following drilldown sets a token inside a search event handler to capture the $result.count$ property representing a failed login event count. It uses a <condition match=" "> element to evaluate the number of failed logins. If there are more than 5,000 events, the drilldown links to an internal runbook for troubleshooting failed logins.

<single>
    <search>
      <query>souce="recent_login_events" type=failed_login | stats count</query>
      <earliest>-24h@h</earliest>
      <latest>now</latest>
      <done>
        <set token="count">$result.count$</set>
      </done>
    </search>
    <option name="colorMode">block</option>
    <option name="useColors">1</option>
    <option name="drilldown">all</option>
    <drilldown>
      <condition match="$count$ > 5000">
        <link>http://companydocs.com/failed_login_runbook
        </link>
      </condition>
    </drilldown>
 </single>

Capture values from multivalue fields

Multivalue fields can appear multiple times in an event. Each time that the field appears in an event, it can have a different value. You can configure a drilldown to link to specific targets depending on the value that users click.

When setting up a drilldown from a table, you typically use $click.name$ or $click.name2$ to capture the value that users click in a column or row. However, when working with multivalue fields, use $click.value2$ to capture the selected value for the drilldown. Use a <condition> element with a field attribute to limit the column selection to the multivalue field.

See Configure multivalue fields in the Knowledge Manager Manual for more information on working with multivalue fields in your data.

Additional information

Example