Different ‘bracket’ types have different meanings depending on how they are used.

 

Parentheses (normal brackets) can change the order in which a formula is processed. They can be used for additional clarity to the reader or force the function to be evaluated in a specific order.

 

Curly Brackets {} will for the most part behave the same as normal brackets but have a special meaning when used in the WHERE clause. In this caseany values in the curly brackets are evaluated first, before the rest of the formula is evaluated for each item.

 

Square Brackets [] denote an array or collection. Separate items within a collection with commas.

 

Bracket Type

Purpose

Normal Brackets ()

Changes the sequence of the evaluation of the function.

Curly Brackets {}

Does the same as the normal bracket except in the WHERE clause where it is evaluated for each item before the formula is evaluated for all items.

Square Brackets []

Denotes a collection of array values.

 

Examples


Using square brackets to ensure the formula is processed correctly


3+6/2 = 6 which is the same as 3 + (6/2), but (3+6)/2 = 4.5


Using curly brackets in the WHERE clause to find the value of an attribute first.


WHERE(parent={name})


Using square brackets to denote an array of numbers


[1, 2, 3, 4]