Defining user-defined functions

Although you define global functions in the Function painter and object-level functions in the painter for a specific object, in both cases you define and code the function in a Script editor.

When you add a new function, a Prototype window displays above the script area in the Script editor. The fields in the Prototype window are in the same order as the function's signature:

  • The function's access level, return type, and name

  • For each parameter, how it is passed, its datatype, and its name

  • The exceptions the function can throw, if any


The following sections describe each of the steps required to define and code a new function: