List parameters
List parameters allow you to pass multiple values into a parameter and use them in Cypher queries.
Define the parameter once, then reference it using the $ prefix.
See Cypher Manual → Lists
Example
Examples used here use the Northwind dataset as outlined in Northwind sample dataset and you can recreate them in your own dashboard.
This example compares how many items are ordered by selected countries.
-
Set the list parameter
$list = ["UK", "France", "Germany"] -
Add a card and set the visualization to a bar chart.
-
Paste the Cypher query:
MATCH (o:Order)-[r:ORDERS]->(p:Product)
WHERE o.shipCountry IN $list
RETURN o.shipCountry AS country,
sum(r.quantity) AS unitsOrdered
ORDER BY unitsOrdered DESC
As a result, we can see in the Northwind dataset that Germany orders the most units, followed by the UK, then France.
Figure 1. Compare how many items are ordered by selected countries.