Defining a Developer Function (Magic xpa 3.x)
From the Logic Editor, you can click Ctrl+H for a new function header line and define the function by entering the following information:
Name
|
You can enter the Developer function name, which can be up to 30 characters. Duplicate function names are supported. The function name can contain letters, digits, and underscores. The function name cannot be left blank.
Note: Magic xpa allows you to type in the control name before it is added to the task form.
|
Scope
|
The available options are:
-
Task – The function is available only for the current task.
-
SubTree – The function is available for the current task or any of its subtasks.
-
Global (Main Program) – Selecting this option enables you to publish the function as part of a component. This function will be available for any task in the host application.
See also:
How Do I Create a Function that Is Available for the Current Task Only?
How Do I Create a Function that Is Available for the Entire Project?
How Do I Share a Function Between Several Projects?
|
Returns
|
You can set an expression to be returned to the calling task.
Setting a returned value expression is not mandatory.
The returned value can be of any attribute.
See also How Do I Set the Return Value of a Function?
|
Execute On
|
Determines whether the entire handler will be executed on the server, or will be executed either on the server or on the client according to the runtime flow. This property only appears in Rich Client tasks.
The options are:
-
Optimized (default)
-
Server
|
You can create a simple help string for the Developer function by entering text in the Comments box, F12, between the characters /* and */, such as /*Replaces a specified token by another string*/. When you select the Developer function, the help string is displayed at the bottom of the Selection list.
Developer Function Behavior
Developer Functions and Components
Developer Function Runtime Behavior