Variables (Functions)

This routine aims at storing and cataloguing functions developed to calculated determined information, with the possibility of passing the maximum number of parameter for the recursion in the function is. These registered functions are identified as Variables in the system.

The registering is through the Configuration routine - Indicators, when accessint option Variables (Functions) a browser having the Variables is presented.

Procedures

Adding Indicators Classification:

1. On Indicators Classification, select Add.

The system displays the addition screen.

In the addition of a variable, you must indicate the variable code, function type (user function or Protheus standard), the name of the function already compiled in the Programs Repository, a title for the variable and indicate for each parameter existent in the function its respective type of registered parameter.

The columns Order and Parameter in the lower part are automatically completed after indicating the function type and name. The parameters are obtained from the reading of the programs repository where the function header is checked, enabling the automatic completion of the function parameter.

 

Picture 1 corresponds to the source code of the function that was used in the variable addition, where you can view the header with the parameters that were automatically completed on the variable addition screen.

Picture 1 – Section of the source code (function) VarDispOS.

2. Enter the code Parameter Type for each data grid row in the lower part of the screen. The selection Parameter Type is necessary so there is a content  format that is sent to the function when the variable is calculated.

Important:

All functions must return numeric content, so the formula is properly calculated.

3. Fill out the field according to field help instructions.

4. Check data and confirm them.