Information for: DEVELOPERS   PARTNERS

2D Table node

The 2D Table node takes exactly two input values, referred to as the X-Value and the Y-Value, and produces a single output. The output can be any valid JavaScript value. The 2D Table node is very useful for applying simple segmentation to data.

The input values for the 2D Table node are set when the node is used within a graph. Within the node itself there are simple controls for adding rows and columns to the decision table. Each row and column is headed by a JavaScript expression and the table cell for which the row and column expressions are both true will give the return value. The X-Value expressions are evaluated left-to-right and the Y-Value expressions are evaluated top-to-bottom.

The ‘Add Column’ and ‘Add Row’ buttons are used to add columns and rows to the table respectively. Each column or row is headed by a box which expects an expression to be entered in the ‘Edit Operator’ panel on the right hand side of the window. All JavaScript expressions are passed the Acquia Journey internal variable ‘VAL’ which can be used in any valid JavaScript expression.

Creating a conditional node

To create a conditional node, perform the following actions:

  1. Sign in to your Acquia Journey interface.
  2. Identify the project you wish to modify.
  3. Click the Project Editor icon.
  4. In the top left-hand corner of the screen, click the Action Menu icon.
  5. Select + Create New from the list.
  6. Enter the name of your new 2D Table node in the Name field.
  7. Scroll through the list of node types to find the Logic section, and click 2D Table.
  8. Click Create New Item.
  9. Use the Add Column and Add Row buttons to construct your data matrix.
  10. Click Save.

2D Table return values

The 2D Table will return the value at the intersection of the X-Value and Y-Value row and column or it will return an error in the Testing Console. The 2D Table can return any valid JavaScript literal value, a schema location or a public variable. For example, to return a more complex segmentation object from the table above a literal such as this could be used for the cell return value:

  "label" : "youngMan",
  "offer" : 1

This allows complex two-dimensional segmentations to be applied.

Validation warnings

Warning Description
Each table cell must have a valid (non-empty) data reference One or more table cells do not have a data reference (literal, schema or public variable) set.
Each column must have a condition No expression has been given for the column or row.


  • Unable to find value for (x or y) parameter – One of the X or Y values has not been provided in the schema.