> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omni.co/llms.txt
> Use this file to discover all available pages before exploring further.

# links

> Add templated URL links to measure drill menus, enabling cross-linking to external tools and dashboards from aggregated results.

Fields referenced in links are implicitly added to the query, but not shown in the result data unless explicitly included.

**Note**: Avoid referencing a dimension with more than one value for a given value of the dimension on which the link is defined, as it can impact aggregations and seemingly create duplicate rows.

## Syntax

```yaml theme={null}
<measure_name>:
  links:
    - url: <url_template>
      label: <link_label>
      icon_url: <optional_icon_url>
```

## Properties

<ParamField path="measure_name" type="object[]">
  The name of the measure.

  <Expandable title="measure_name properties" defaultOpen="true">
    <ParamField path="links" type="object[]">
      An array of link objects, each containing `url`, `label`, and optionally `icon_url`.

      <Expandable title="links properties" defaultOpen="true">
        <ParamField path="url" type="string">
          The URL template, with field references using `${}` syntax.
        </ParamField>

        <ParamField path="label" type="string">
          The display text for the link.
        </ParamField>

        <ParamField path="icon_url" type="string">
          Optional URL to an image, which will display as an icon with the link.
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

## Examples

```yaml title="Google search link" theme={null}
country:
  links:
    - url: https://www.google.com/search?q=${users.country}
      label: Google
```

<Tip>
  To inject the corresponding field into the filter URL structure, navigate to a filtered dashboard in your browser and then swap in the parameterized (dynamic) URL.
</Tip>

```yaml title="Dashboard crosslink with icon" theme={null}
id:
  sql: '"ID"'
  format: ID
  links:
    # Works just for string filters
    - url: https://sandbox.omniapp.co/dashboards/KWsNP1WK?f--omni_dbt_ecomm__order_items.user_id={"values":["${omni_dbt_ecomm__users.id}"]}
      label: User Lookup Dashboard
      icon_url: https://avatars.githubusercontent.com/u/100505341?s=200&v=4
    # For all types of filters use the encoded URL
    - url: https://sandbox.omniapp.co/dashboards/YX-irW2S/user+lookup?f--ecomm__users.id=%7B"values"%3A%5B"${ecomm__users.id}"%5D%7D
      label: User Lookup Dashboard
      icon_url: https://avatars.githubusercontent.com/u/100505341?s=200&v=4
```
