Creating a New Macro
Let's start with our example function chain from sections Functions (GUI) and Macros (GUI).
If you want to create this function chain as a new macro, you will get the following dialogue.
(1) Name of the macro and a description text that will later be displayed as a tooltip.
(2) Here you can add further functions to the function chain (3). But to keep the example simple, we will not do that now.
(3) The current function chain with all its individual functions. If you mark a function, the parameters of the function are displayed (as usual).
Creating Input Parameters for the Macro
If you save the macro created above, you can already use it on fields and nodes. The example above, however, is very simple and not really helpful in this form. Often, as you are used to from most functions, you also want to use input parameters.
For this task, there is a special input parameter type Parameter for macros only, which you can select instead of any of the input parameters in the function chain. See the following example.
Example
Highlight parameter a of the first function in the chain, change the type to Parameter and set the value from 4 to 1. The value is the parameter index. We will look into that later.
In order to use an input parameter in a macro, it must first be created. Use the context menu in area (4) and create a new parameter, which has the index 1. That is the value you entered above. You can optionally specify a description and a test value. The test value is used as the input value for this parameter if you execute (5).
If you now use the macro on a node or field, it looks like this.
Enter the value 5 for parameter a. As a result in a mapping test, you should now get 27.