Xapix has developed an extensive set of functions called Axel-F functions that combine the most understandable syntax from Excel© and the speed of the programming language Clojure. These functions have a syntax similar to Excel formulas and other spreadsheet functions. However, unlike spreadsheet functions, they do not include cell references.
Axel-F functions can be used in combination with references and operators. They also include additional functions to work with lists such as MAP, FILTER, SORT, LENGTH and CONCAT, as well as Lambda (anonymous) functions, such as FN.
To take a simple example, let's use a
CONCATENATE function with references to two attributes to generate a third value based on those references.
CONCATENATE(data.vehicle_1.make, "-", data.vehicle_1.vin)
Axel-F function -
Xapix provides aids to entering formulas in the Formula editor:
Function auto-completion: When you start typing a function in a formula field, Xapix will suggest functions. When you enter a letter in the formula field, you are given suggestions to auto-complete the formula. For example, entering in the formula editor the letter
C shows a list of all function beginning with c such as
CONCATENATE() and so on.
Syntax errors: Any errors made in syntax are indicated by a warning such as "
Error parsing formula", etc. If there are no errors, a "
Formula valid" message appears with an accompanying check mark.
Preview of next level elements - By entering the unit name for which you are mapping to the selected unit, a JSON preview and a list of available next level elements are provided. This serves as a hint as to which properties can be added as the next level. For example,
Built-in Help text - Links to help text is available for each function.
Using Axel-f function, you can create custom parameters.
For example, suppose an endpoint has two body parameters: first_name and last_name. Using the CONCATENATE function, you can create a third parameter called full_name.
These are the references for the two attributes we use to create the third parameter:
We can now create the new parameter called full_name using the following formula: