Editing a custom function

About this task

To edit an existing custom function:

Procedure

  1. Select the Functions tab. In the Function tab, the list of standard functions is displayed. In addition, the Actions pane opens.
  2. In the Function tab, expand Custom Functions.
  3. Select the custom function to edit.
  4. 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.

  5. 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:
      1. Click Add.  
      2. In the Name field of the Parameters table, enter the name of the parameter.
      3. Select a Type for the parameter, from one of the following options:
        • string
        • number
        • boolean
      For more information about these datatypes, see Custom Function Parameter and Return Datatypes.
    • Delete a Parameter - To delete a parameter from your custom function follow these steps:
      1. In the Name field of the Parameters table, select the parameter and press the Return key.
      2. Click Delete.
    • Change the Return Type - To select one of the following options from the Return Type field:
      • string
      • number
      • boolean
      For more information about these datatypes, see Custom Function Parameter and Return Datatypes.
    • Edit the source code - To edit the source code of your custom function, follow these steps:
      1. Click Next.
      2. In the white area displayed between the braces enter the JavaScript code of your custom function.
      3. 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.

      4. 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.




Feedback | Notices


Timestamp icon Last updated: Tuesday, 27 September 2016


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.doc/editing_a_custom_function.html