• Documentation

Use wildcards in a “Text input” control

“Text input” controls require an exact string match. However, you can set up searching by partial string matches, which lets you use wildcards, for both single-value and multi-value “Text input” controls.

For single-value “Text input” controls

In a visual mode query

Setting up partial string matches for single-value “Text input” controls is similar to the usual setup process. The main difference is you’ll just need to use a different filter operator (either like or not like) when connecting the “Text input” to a query. Learn how to set up a “Text input” control.

When you or other dashboard viewers use the “Text input” on the dashboard, you can now use wildcards in the search terms of your “Text input”.

For example, if you wanted to filter your chart for names that start with “B”, you’d use the following search term in your “Text input”: B%

Using a wildcard in a Text input control to filter for names starting with B

In a SQL mode query

When you set up a “Text input” control to use wildcards in a visual mode query, the dashboard viewers are the ones who need to remember to use wildcards when filtering with the “Text input”. If you want to handle wildcards in the background, you can do this in a SQL mode query.

When you reference the “Text input” control in your query, make sure to append .RAW to your control's name and wrap the search term (including any wildcards) in single quotes.

Here’s a general example of how you’d do this in a WHERE clause:

1 WHERE column_name LIKE '%{TEXT_INPUT_NAME.RAW}%'

For multi-value “Text input” controls

Setting up partial string matches for multi-value “Text input” controls requires a little more work. Your chart will need a few tweaks to set this up, as lists can only include exact matches and wildcards are not compatible with the “is one of” and “is not one of” filter operators. Additionally, the “like” and “=” operators allow for only one value. You’ll need to edit the SQL directly in SQL mode to accommodate this type of filtering.

  1. Hover over the chart connected to your “Text input” control.

  2. Select More actions () then select Edit chart.

  3. Select the query connected to your “Text input” then select the Pencil to edit it.

  4. If the query uses visual mode, select SQL to switch to SQL mode.

  5. Edit the WHERE clause with the following format:
    WHERE table_name.column_name LIKE any ({TEXT_INPUT})

  6. Replace table_name and column_name with the table name and column name of the column whose values you want to filter, and TEXT_INPUT with the name of your control.

  7. Select Run query. If there are no errors, the result table will update with the new filter applied to the data.

  8. Select Save to dashboard to save the chart.

When you or other dashboard viewers use the “Text input” on the dashboard, you can now use wildcards in the search terms of your “Text input”.

For example, if you’re trying to filter for particular email domains, you can wrap each search term with the % wildcard. The format will generally look like this: %searchterm%.

The other SQL wildcard characters should work as well.

Using wildcards in a Text input control to filter for specific email domains

Still need help?

The Atlassian Community is here for you.