The most basic formula is a reference that queries a specific value in an attribute. The syntax of a reference query is defined as a set of dot-separated fields.
<unit> is the name of the Connector unit or flow unit
<path> is the parameter type in the unit
<attribute> is the value passed to the parameter
For example, this reference formula follows the object structure of a given Connector.
findvariantbyid is the Connector
body is the path to the attribute
engine_type_id is the name of the attribute
Based on the Connector, this reference formula resolves to the following value, in this case an integer value.
For example, let's say we have a project that uses a REST endpoint and a connector called allVariants. It includes a parameter that outputs a currency value priced in Euros. However, suppose we want the currency value priced in US dollars. We would use several Axel-f functions and some operators.
The original formula in the Formula editor of the Mapping dashboard is shown below for the endpoint.
The original reference formula looks like this.
# Property formula:allVariants.body..base_price_EUR# Result:
Using this reference formula, we modify it so that every returned record's base price is in US dollars rather than Euros.
We first want to change the name of the parameter:
In the Mapping dashboard, hover over the parameter name
base_price_EUR and click Edit name to make the field editable
Change the name of the parameter from
Next, let's change the formula for the property
base_price_USD in the Formula editor.
Hover over the parameter value for
base_price_EUR to reveal the dropdown and click Edit formula to open the Formula editor.
Currently, the field contains the following reference formula:
If the changes were made correctly, a Formula valid message appears.
Click Save to save the changes.
The value of the parameter
base_price_USD is now
Once you have made the changes, click Done to close the Mapping editor.