Editing a custom function
About this task
Procedure
- Select the Functions tab. In the Function tab, the list of standard functions is displayed. In addition, the Actions pane opens.
- In the Function tab, expand Custom Functions.
- Select the custom function to edit.
- To display the Custom Function dialog
box, choose from one of the following options:
- Right-click the function node in the Functions tab and from the menu select Edit....
- In the Actions pane, select Add New Lookup Table.
The Custom Function dialog box opens.
- In the Custom Function dialog box,
edit your custom function using one of the following actions:
- Add a Parameter - To add a parameter to your custom
function follow these steps:
- Click Add.
- In the Name field of the Parameters table, enter the name of the parameter.
- Select a Type for the parameter, from one
of the following options:
- string
- number
- boolean
- Delete a Parameter - To delete a parameter from your
custom function follow these steps:
- In the Name field of the Parameters table, select the parameter and press the Return key.
- Click Delete.
- Change the Return Type - To select one of the following
options from the Return Type field:
- string
- number
- boolean
- Edit the source code - To edit the source code of your
custom function, follow these steps:
- Click Next.
- In the white area displayed between the braces enter the JavaScript code of your custom function.
- Click Compile.
The syntax of the function will be checked and any errors reported. The location of the errors is highlighted in red in the source code.
- Fix any syntax errors and once the function compiles successfully,
click OK and then Finish.
The custom function is now available from the Custom Functions folder of the Functions tab.
- Add a Parameter - To add a parameter to your custom
function follow these steps:
Parent topic: Using Custom Functions and Lookup Tables