Scene actions

Scene actions are parameterized Cypher queries, much like Search phrases. The difference is that in a Scene action, the parameters can be the selected elements in your current selection instead of all available and matching elements in your graph. Also, whereas Scene actions are defined in the Perspective drawer under Saved Cypher, they are invoked from the context menu.

The Scene actions are listed in the order they were created. Bloom lets you reorder them any way you like by dragging and dropping them as you please in the Perspective drawer. The order of Scene actions in the Perspective drawer is also reflected from the context menu.

scene action context

In the following example, using the Northwind graph, a Scene action, Discontinued products, is created (and saved) based on the selected nodes in the scene. This Scene action is available from the context menu when node(s) are selected and displays products that have been discontinued from the selected suppliers.

It is possible to make the Scene action available for only some categories, you control this in the Action Availability dropdown menu.

scene action

If a relationship is selected instead of nodes, the Discontinued products Scene action is not available, which is a result of the WHERE id(n) in $nodes on the second line of the Cypher query.

scene action relationship

If you write a Scene action where your query targets relationships rather than nodes, they are defined in a similar fashion, WHERE id(r) in $relationships. However, Bloom reminds you if you forget.

Only the distinction between $nodes and $relationships matters to a Scene action’s availability for a selected element. Any further refinement, such as the p.discontinued=true in the example, is ignored in from this point of view. For example, if you select a Supplier node that is not connected to any discontinued products, the Scene action Discontinued products is still available, but running it does not yield any results.