Grouping collections

.groupBy() allows nodes to be grouped by one or multiple properties

These grouped results can then be exported from the Gizmo editor for use outside orgvue

groupBy() follows this general syntax

nodes().groupBy(['propertyA', 'propertyB'] )

In this example of grouping all nodes by location and department:

nodes().groupBy(['location','department'])

image

  1. The expression is run in the Gizmo editor
  2. The results are shown in the results window with the node UUID being shown as the value
  3. Using the Copy results function of the Gizmo editor
  4. The results can then be pasted into notepad or other text editors
  5. When pasted the results will display the node label for each node in the group

groupBy() can be used with count to perform calculations or counts on records or other property values

nodes().groupBy(['location','department']).count

The addition of .count to the expression will return a count of the groups

image

results matching ""

    No results matching ""

    results matching ""

      No results matching ""