Text Input
Text Inputs allow you to type in search terms for filtering your charts.
Create a Text Input
Click Add Control from the dashboard sidebar menu and select Text Input. A modal will pop up for you to customize your Control settings.
Check Multi-value if you’d like to filter your charts by multiple values. When selected, choose whether all results (Show all) or no results (Show none) are displayed when no filter value is selected.
Note: The input widget encloses the search term in single quotes, and therefore does not allow multiple input values in a single search term field.
The Default Value(s) will be used to filter your charts when the dashboard first loads. This field is optional—leave it blank for an empty result set by default.
Connect a Text Input to your chart
In the Visual SQL interface
Open the chart you’d like to connect to your Text Input in Visual SQL. Add the column you want to filter your result set on to the Filters section, select the filter type, and type your Control name wrapped in curly braces. You’ll need to ensure your Text Input has the same data type as the column you’re filtering on. If you selected Multi-value when creating your text input, be sure to use filter type “is one of”, not “equals”.
Keep in mind that Text Inputs require an exact string match. Refer to our section below if you want to search with partial string matches.
Using SQL Mode? Check out how to reference Text Inputs in SQL Mode queries.
In the Data Explorer interface
Open the chart you’d like to connect to your Text Input in the Data Explorer. Drag the column you want to filter your dataset on into the Filters section, select the filter operator, and select your Control name. You’ll need to ensure your Text Input has the same data type as the column you’re filtering on. If you selected Multi-value when creating your Text Input, be sure to use filter operator “is one of”, not “equals”.
Keep in mind that Text Inputs require an exact string match. Refer to our section below if you want to search with partial string matches.
Using SQL Mode? Check out how to reference Text Inputs in SQL Mode queries.
Partial string matching
Text Inputs require an exact string match. To search by partial string matches, you’ll need to do the following:
-
For single-value Text Inputs, use wildcards (e.g., percent signs) in your search term and use the “like” filter operator in your chart. For example, if you wanted to filter your chart for names that start with “B”, you’d use the “like” filter operator when connecting the Text Input to your chart and use the following search term in your Text Input:
B%
-
For multi-value Text Inputs, follow our FAQ for using wildcards in multi-value Text Inputs.