Parameters and filters

Parameters

Parameters are associated with a specific dashboard. Each parameter has a value and type both of which you can set initially.

Display the parameters of a dashboard by using the parentheses button to show the Parameters drawer.

parameters drawer
Figure 1. The parameters drawer

The drawer shows the dashboard parameters in alphabetical order. Each parameter has an icon next to it hinting at its data type:

  • A text icon for strings.

  • A hashtag icon for numbers.

  • A calendar icon for dates.

  • A filter icon for unspecified data types.

Creating a parameter

  1. From the Parameters drawer, use the Add button.

  2. In the dialog, enter a parameter name, select a data type and optionally an initial value for the parameter, then Save.

Editing a parameter

  1. From the Parameters drawer, hover over the parameter you wish to edit.

  2. In the dialog, edit the parameter name, data type and/or initial value, then Save.

Using a parameter in a query

To use a parameter in a query, prefix the parameter name with $. For example, to use a parameter with a number value of 4 and the name "unit_param", use $unit_param in your query:

Cypher query for a table which displays products with a certain number of units in stock
MATCH (p:Product)
WHERE p.unitsInStock = $unit_param
RETURN p.productName as product, p.unitsInStock AS units
  LIMIT 10
parameter in query
Figure 2. Using a parameter in a query to display products with a certain number of units in stock

Deleting a parameter

From the Parameters drawer, hover over the parameter you wish to edit and use the trash bin button.

Filters

Filters are special dashboard cards.

filter units in stock card
Figure 3. A filter card for the product node property unitsInStock

You can add them to your dashboards in a similar fashion. You can use a filter to dynamically set parameter values inside queries.

Adding a filter

  1. In the Dashboards page, use Add filter at the bottom right.

  2. In the Add filter dialog, select a filter type: a node or relationship type, and a property.

  3. Use either an existing parameter or create a new one, then Save.

filter units in stock
Figure 4. Creating a filter for the product node property unitsInStock

Making filters dependent on a node or relationship property is necessary to let the dashboard infer values for the filter card to chose from.

Editing a filter

  1. In the Dashboards page, use the more menu […​] of the filter you wish to edit and select Edit filter.

  2. Edit your filter and Save.

Deleting a filter

In the Dashboards page, use the more menu […​] of the filter you wish to edit and select Delete, then confirm.

Using a filter in a card

Use the filter parameter as you normally would in the query of the card.

For example, the table from Using a parameter in a query and the parameter from Adding a filter are connected. You can select a value from the filter card drop down to let the dashboard assign this value to the parameter $example_number_param and dynamically update the table:

filter and card
Figure 5. Selecting a new value for the unitsInStock filter

All cards which make use of the parameter are updated with the new value.