Actions

To help people drill down in their data and navigate, you can add actions in a variety of places.

Use cases

Actions can be used in the following places-

  • On a metric in a detail view by adding the action at metric.action = {}
  • As a standalone button in a detail view.
  • On a list item

To direct users to a different tool, use a link-tool action. The tool must be in the same app, and available to the user.

Example:

    "action": {
      "type": "link-tool",
      "tool": {
        "type": "static",
        "value": "insights"
      },
      "title": {
        "type": "static",
        "value": "Insights"
      }
    }

Within the Atom Detail tool, you can load a different view using a link-new-view action. This view must be in the same tool.

Example:

    "action": {
      "type": "link-new-view",
      "view": {
        "type": "static",
        "value": "view_id"
      },
      "title": {
        "type": "static",
        "value": "View detail"
      }
    }

You may pass context to a link that the new view can use in Data sources in tools.

The context key takes an array of static or field definitions, with the additional key name.

Example:

    "action": {
      "type": "link-new-view",
      "view": {
        "type": "static",
        "value": "view_id"
      },
      "title": {
        "type": "static",
        "value": "View detail"
      },
      "context": [
        {
          "type": "field",
          "field": "country",
          "name": "country"
        },
        {
          "type": "static",
          "value": "Belgium",
          "name": "country_static"
        }
      ]
    }

In the data source filter for the new view-

  • the value for field “country” will be used in filters that refer to “context_name”: “country”
  • the value “Belgium” will be used in filters that refer to “context_name”: “country_static”.

You are able to link to an external website using a link-external action. The full URL must be provided, including ‘http’.

Example:

    "action": {
      "type": "link-external",
      "href": {
        "type": "static",
        "value": "http://www.aunalytics.com"
      },
      "title": {
        "type": "static",
        "value": "View detail"
      }
    }