Bonnard

A param is what the dashboard declares, and a filter is the control a viewer changes.

Requirements

  • A dashboard you can change.
  • To work from your AI client: Bonnard connected and the Dashboards switch on in Settings, AI tools.

Declare a param

In your AI client

Ask:

On <dashboard>, add a <label> filter with values from <column> in <table>. Use it in each tile.

In the console

  1. In the console at app.bonnard.ai, open the dashboard, then select Edit.
  2. Select Params, then Add param.
  3. Enter a name, then select Text, Number, or Date.
  4. Set Shown as, Values from, and Starting value.
  5. Put {{name}} in each tile’s SQL, with no quotes.
  6. Select Save, or Publish changes on a verified dashboard.

In the console, Values from takes a plain table or schema.table. Declare any other name from your AI client, for example project.dataset.table, and change that dashboard there, because the editor then blocks Save:

The table must be a plain name (letters, digits, underscores), optionally schema.table.

The two paths set the same fields:

Console labels and the param fields they set
Console labelFieldWhat it sets
Shown aslabelThe filter name viewers read
Values fromvaluesFromThe table and column that hold the values
OrdersortByThe order of those values
Starting valuedefault, requiredWhat the filter opens on
Description for AI clientsdescriptionHow an agent gets a valid value

{{name}} works in tile SQL, titles, and KPI captions:

SELECT COUNT(*) AS orders FROM <table> WHERE <column> = {{name}}

Make a filter optional

Put [[ AND ... ]] around each condition on the param, in each tile. The filter then offers All, and with no value the condition is dropped.

In your AI client

Ask:

Make the <label> filter on <dashboard> optional, so viewers can select All.

In the console

  1. In the dashboard editor, select Edit. In each tile that uses the param, put [[ ]] around the condition:

    SELECT COUNT(*) AS orders FROM <table> WHERE 1=1 [[ AND <column> = {{name}} ]]

  2. Select Params, the param, then Starting value.

  3. Select the option that starts with All.

  4. Select Save, or Publish changes on a verified dashboard.

Make viewers select a value first

With People choose first set, no tile loads until a viewer selects a value.

In your AI client

Ask:

On <dashboard>, make viewers select a <label> before anything loads.

In the console

  1. In the dashboard editor, select Edit, Params, the param, then Starting value.
  2. Select People choose first.
  3. Select Save, or Publish changes on a verified dashboard.

The option reads Not available: this filter can be cleared, so it cannot require a value. while the condition is inside [[ ]]. Remove the brackets first.

Open on the latest value

With Starting value set to First in the list, the filter opens on the first value in its order, so sort newest first.

In your AI client

Ask:

On <dashboard>, make the <label> filter open on the newest value, ordered by <column>.

In the console

  1. In the dashboard editor, select Edit, Params, the param, then Order.
  2. Select the column, then Newest first.
  3. Select Starting value, then First in the list.
  4. Select Save, or Publish changes on a verified dashboard.

Make sure that the filter shows

In your AI client

Ask:

Show the <dashboard> dashboard.

The agent’s reply names each filter’s starting value, for example Channels: All. A param with no description warns when saved: param "<name>" has no description, so a caller in a later session sees only its name.

In the console

In the dashboard editor, select Preview. The filter shows above the tiles with its starting value.

Change or delete a param

Changing a param’s name changes {{name}} in each tile, and links or saved calls that use the old name fail. Changing Shown as changes only the filter name viewers read.

In your AI client

To change it, ask:

Rename the <label> filter on <dashboard> to <new label>.

To delete it, ask:

Remove the <label> filter and its conditions from <dashboard>.

In the console

  1. In the dashboard editor, select Edit, Params, then the param.
  2. Change its name or another field, or select Delete param. First remove {{name}} from each tile, because Bonnard refuses a tile that names a deleted param.
  3. Select Save, or Publish changes on a verified dashboard.