URL Actions

A URL action is a hyperlink that points to a web page, file, or other web-based resource outside of Tableau. You can use URL actions to create an email or link to additional information about your data. To customize links based on your data, you can automatically enter field values as parameters in URLs.

Tip: URL actions can also point to a web page object in a dashboard. See Actions and Dashboards to learn more.

A URL action run from a tooltip menu. The link reflects the action name, not the target URL.

Open a web page with a URL action

Note: Steps on this page refer to the interface of Tableau Online and Tableau Server. The sequence and naming of options differs slightly in Tableau Desktop.

  1. On a worksheet, select Worksheet > Actions. From a dashboard, select Dashboard > Actions.

  2. In the Actions dialog box, click Add Action and then select Go to URL.

  3. In the next dialog box, enter a name for the action. To enter field variables in the name, click the Insert menu to the right of the Name box.

    Note: Give the action a descriptive name, because in tooltip menus the link reflects that name, not the URL. For example, when linking to more product details, a good name could be “Show More Details”.

  4. Use the drop-down list to select a source sheet or data source. If you select a data source or dashboard you can select individual sheets within it.

  5. Select how users will run the action.

    If you choose this option... The action is run when the user...
    Hover Mouses over a mark in the view. This option works best for highlight and filter actions within a dashboard.
    Select Clicks a mark in the view. This option works well for all types of actions.
    Menu Right-clicks (control-clicks on Mac) a selected mark in the view, then clicks an option in a tooltip menu. This option works particularly well for URL actions.
  6. For URL Target, specify where the link will open:

    • New Tab if No Web Page Object Exists — Ensures that the URL opens in a browser on sheets that lack web page objects. This is a good choice when Source Sheets is set to All or a data source.

    • New Browser Tab — Opens in the default browser.

    • Web Page Object — (Available only for dashboards with Web Page objects) Opens in the web page object you select.

  7. Enter a URL with one of the following prefixes:

    • http, https, ftp, mailto, news, gopher, tsc, tsl, sms, tel, file

    • Tableau Desktop also supports local paths like C:\Example folder\example.txt

    To enter field and filter values as parameters in the URL, click the Insert menu to the right of the URL. Be aware that any referenced fields must be present in the view, not just a related data source. For details, see Using field and filter values in URLs.

    Note: On a dashboard, you can specify an ftp address only if the dashboard doesn't contain a web object. If a web object exists, the ftp address won't load.

    Below the URL you enter is a hyperlinked example you can click for testing.

  8. (Optional) In the Data Values section, select any of the following options:

    • Encode Data Values that URLs Do Not Support — Select this option if your data contains values with characters that browsers don't allow in URLs. For example, if one of your data values contains an ampersand, such as “Sales & Finance,” the ampersand must be translated into characters that your browser understands.

    • Allow Multiple Values via URL Parameters — Select this option if you are linking to a web page that can receive lists of values via parameters in the URL. For example, say you select several products in a view and you want to see each product’s details hosted on a webpage. If the server can load multiple product details based on a list of identifiers (product ID or product name), you could use multi-select to send the list of identifiers as parameters.

      When you allow multiple values, you must also define the delimiter escape character, which is the character that separates each item in the list (for example, a comma). You must also define the Delimiter Escape, which is used if the delimiter character is used in a data value.

Create an email with a URL action

  1. On a worksheet, select Worksheet > Actions. From a dashboard, select Dashboard > Actions.

  2. In the Actions dialog box, click Add Action, and select Go to URL.

  3. In the Source Sheets drop-down list, select the sheet that contains the field with the email addresses you want to send to.

  4. In the URL box, do the following:

    • Type mailto:, and click the Insert menu at right to select the data field that contains email addresses.

    • Type ?subject=, and enter text for the Subject line.

    • Type &body=, and click the Insert menu at right to select the fields of information that you want to include in the body of the email.

    In the example below, the “Email” field contains the email addresses, the subject is “City Information”, and the body text of the email consists of the city and state data that is associated with the email address.

     :

  5. (Optional) Display data from your workbook in the body of your email as a vertical list instead of the default horizontal list. For example, suppose you have a horizontal list of cities, such as Chicago, Paris, Barcelona, which you would rather display vertically, like this:

    Chicago
    Paris
    Barcelona

    To make the list vertical, in the Data Values section, do the following:

    • Deselect Encode Data Values that URLs Do Not Support

    • Select Allow Multiple Values via URL Parameters.

    • Type %0a in the Value Delimiter text box to add line breaks between each item in the list. (These are the URL-encoded characters for a line break.)

Using field and filter values in URLs

When users trigger URL actions from selected marks, Tableau can send field, filter, and parameter values as variables in the URL. For example, if a URL action links to a mapping website, you could insert the address field to automatically open the currently selected address on the website.

  1. In the Edit URL Action dialog box, begin typing the URL for the link.

  2. Place the cursor where you want to insert a field, parameter, or filter value.

  3. Click the Insert menu to the right of the text box and select the field, parameter, or filter you want to insert. The variable appears within angle brackets. You can continue adding as many variables as you need.

    Note: Any referenced fields must be present in the view, not just a related data source. Otherwise, the link won't display in the viz, even if it functions when you click Test Link.

Including aggregated fields

The list of available fields includes only non-aggregated fields. To use aggregated field values as link parameters, first create a related calculated field, and add that field to the view. (If you don't need the calculated field in the visualization, drag it to Detail on the Marks card.)

Inserting parameter values

When inserting parameter values, URL actions send the Display As value by default. To instead send the actual value, add the characters ~na after the parameter name.

For example, say you have a parameter that includes IP addresses, with Actual Value strings such as 10.1.1.195 and Display As strings with more friendly values such as Computer A (10.1.1.195). To send the actual value, you'd revise the parameter in the URL to look like this: http://<IPAddress~na>/page.htm.

Thanks for your feedback!