How to: |
Reference: |
A function, also known as a case, is a series of commands in a procedure grouped together as a unit of control. A function accomplishes a task, such as calculating values, extracting data from a data source to place in a data source stack, or writing information to a data source. You can also call one function from within another function.
Note: For more information on local and global variables, see the WebFOCUS App Studio Maintain Data Language Reference content.
Note: The following Maintain Data language commands are not valid within the context of a function: CASE, ENDCASE, MAINTAIN, END, MODULE, and DESCRIBE.
Tip: You can add Maintain Data language code to your function using the Language Wizard. Place your insertion point where you want your code to go, right-click in the Maintain Data Editor window and select Language Wizard in the shortcut menu.
Tip: You can add Maintain Data language code to your function using the Language Wizard. Place your insertion point where you want your code to go, right-click in the Maintain Data Editor window and select Language Wizard in the shortcut menu.
This dialog box contains the following options:
The name you assign to your function (or case). This name can be up to 66 characters long. It must begin with a letter and can include any combination of letters, digits, and underscores (_).
Lists the arguments that the function requires. When you invoke the function, you pass to it variable names or values to substitute for these arguments.
Note: Not all functions require arguments. You cannot use a function with arguments as an event handler.
Contains the name and data type of the return value that the function calculates. This information can be entered directly in the field, or you can use the ellipsis button to open the Function Return dialog box to enter it.