Formulas can consist of references and constants separated by operators. The value of a formula is calculated from left to right; they are left associative.
Operators are used with references and Axelf functions. Here is a very simple illustration of the use of operators ( + ) with references.
modelbyid.base_price + enginebyid.body.price + dealer.body.discount
Operations are grouped from the left. Any field expression can be used as an operand for an operator.
MAP(FN(x, ROUND(x * 1.1, 2)), allvariants.body.[].base_price_EUR)
When more than one operator occurs in an expression, it is evaluated based on order precedence. In general, arithmetic operators are evaluated first followed by comparison operators. To change a precedence of operators, enclose in parenthesis the part of the formula to be calculated first.
((2+2)*2 => 8)
Operator types valid in Xapix include:
.(dot) operators
Array operators
Arithmetic operators
Concatenation operators
Comparison operators
Logical operators
For details see Operators.
Suppose we create an endpoint parameter called total_price
. For this parameter, two references and an operator are used to resolve to the value we want:
findvariantbyid.body.base_price_EUR
findenginebyid.body.price
We first create an endpoint parameter called total_price
. In the Endpoint unit, expand body, then click New Property.
In the New Property field, enter total_price
, click Literal and then Create.
Expand total_price
, then in the dark green area click Set Formula to open the Formula editor.
In the Formula editor, enter the following, then click Save:
findvariantbyid.body.base_price_EUR + findenginebyid.body.price
If you have entered the formula correctly, a Formula valid message appears. Click Save.
The resolved value appears under the endpoint parameter name, total_price.
Operator  Syntax  Description  Example 

 Represents a range of values. 

 â€‹
 Divides elements in an array. Single spaces are ignored.  â€‹

Operator  Syntax  Description 

 Multiply two operands. 

 Divide two operands. 

 Sum or add two operands. 

 Subtract right operand from left operand. 

 Raise operand to the power of the exponent. 
Operator  Syntax  Description 

 Appends (concatenates) two operands or strings together. 
See CONCATENATE. This function is not to be confused with CONCAT, which appends two arrays.
Operator  Syntax  Description 

 Left operand is greater than right operand. Evaluates to true or false. 
 â€‹
 Left operand is less than right operand. Evaluates to true or false. 

 Left operand is less than or equal to right operand. Evaluates to true or false. 

 Left operand is less than or equal to right operand. Evaluates to true or false. 

 Left operand is equal to right operand. Evaluates to true or false. 

 Left operand is not equal to right operand. Evaluates to true or false. 

 Remainder operator that evaluates the remainder after dividing left operand by right operand. 
Operator  Syntax  Description  Example 

 computes a logical negation on an operand or expression. 
