Apply a runtime filter

Learn how to apply a runtime filter.

Runtime filters allow you to apply filters to the data returned by the APIs or the visualization or Pinboard you’re embedding. Before you apply a filter, make sure understand their limitations.

The filters are specified in the called URL as parameters. Before you can use runtime filter(s), you need to do these procedures:

  1. Enable the JavaScript API (JS API) and authenticate to ThoughtSpot.

  2. Use the Data API or Visualization Embedding to retrieve the Answer or Pinboard you want to use.

Now you are ready to add a runtime filter to your Data API call or Embedded object:

  1. Obtain the URL you are using to embed the visualization or call the REST API.

  2. Paste the URL it into a text editor.

  3. Append the runtime filter to the URL, using the runtime filter operators to get the data you want. The format for the runtime filter is:

    • For Embedding a pinboard:

    • For Embedding a visualization:

    • For the REST API with a pinboard:

    • For the REST API with a visualization:

  4. To add additional filters on a particular column, you can specify multiple values by separating them with & (ampersand) as in the example:


    You can also use the IN operator for multiple values, as shown in this example:

  5. Add additional filters by incrementing the number at the end of each parameter in the Runtime Filter for each filter you want to add, for example, col2, op2, val2 and so on.

This example passes multiple variables to a single column as well as multiple columns. It shows that data values are returned as epoch.


Runtime filter syntax

You can use two different types of syntax for runtime filters.

In the first kind of syntax, you can add the runtime filter after the Liveboard ID.

Example 1


This example translates to:


If you use the above syntax, runtime filters are removed whenever you navigate to a different tab within ThoughtSpot.

In the second kind of syntax, you can add the runtime filter before the Liveboard ID.

Example 2


This example translates to:

concat(concat("{caption}pinboard{/caption}https://<thoughtspot-instance>.com/?col1=fruit&op1=eq&val1=",fruit), #/pinboard/e510f946-f9ce-48ad-a4af-1a40a9cf8add")

If you use the above syntax, runtime filters persist, and will be applied to every Liveboard you navigate to.

Was this page helpful?