Content | Function Tree |

The function editor contains normally 4 panels. If the template does not define parameters, or input matrices or output matrices, the related panel is

Here are the panels:

**Info**: a description of the function**Input matrices**: the minimum and maximum amount of input matrices. The minimum amount of matrices defines the number of mandatory matrices. The matrices over the minimum to the maximum amount are optional.**Output matrices**: the minimum and maximum amount of output matrices.

Foe each line (each input matrix) the first two columns show: a

The type of the required matrix can be NUMERIC, TEXT, DATE, BOOLEAN or ANY.

ANY means that that input matrix can be of any type but you need to choose one when creating the function. ANY is used when the template is generic, can work with any type of matrix, for example the “tostring” template which converts a matrix of any type to a text matrix.

To see a description of the function in the selected row click on the

Alternatively you can

In both cases the matrix fills the line: the “Chosen Matrix” column of the line, which was initially empty, is filled with the name and the package of the chosen matrix.

Clicking the

It is not told that all the input matrices lines need to be filled. Some of the matrices can be

This is what happens if you are entering a standard output matrix (callback column empty), clicking on the

If the matrix definition type is ANY, the actual type of the matrix is requested through the matrix type dialog.

After that you need to give a name-package to the matrix using the name-package dialog. Since these matrices are the result of the function, Matrex verifies that they

If the callback column contains the value "Yes", the output matrix is callback.

In this case, the matrix needs to be already in the project when the function is added, and it must be a base matrix (not output of any other function).

The Set Matrix button opens the matrix selection dialog to select the callback matrix: since the matrix must be already in the project, it must be selected from the base matrices of the project.

Also here you have mandatory and optional matrices. You can know which matrices are mandatory and optionals looking at the minimum-maximum amount of output matrices in the Template Info panel. The same considerations seen for the optional input matrices can be done here.

Some parameters are entered as text, other are selectable in a dropdown list.

When the parameter if of

The editor type depends by how this parameter is declared in the template:

- If it is declared as NORMAL_TEXT, the editor is a multiline text box, that simplifies editing small texts.
- If it is declared as FILE, it is assumed that the text must be the path of a file, so you can select it in an Open File dialog.

Parameters of

Parameters can be selected from a

Like with the input and output matrices, some parameters are mandatory, some are

- click on
the
**Cancel**button on the bottom of the editor. In this way you close the editor without saving the content of the function (you need to confirm this choice).

- click
on the
**Save**button on the bottom of the editor. In this way you save the content of the function and close the editor. To do that, you need to enter the name and the package of the new function in the name-package dialog, in the same way as with the matrices.

Only if the function is complete (all the mandatory input matrices, output matrices, parameters have been set), it is possible to save. If these conditions are not satisfied an error appears (“Not enough...”) and it is possible to fix the problem.

When you save it, the function is calculated and all the output matrices are created (or overwritten if you edited an existing function with the same output matrices).