Skip to main content Skip to complementary content
Close announcements banner

Creating a user routine

Procedure

  1. In Repository, click the Code node, then Routines, then right-click on Routines and select the Create routine option to create a user routine.
  2. In the pop-up window, enter a routine name in the Name field (this example uses MyRoutineDemo). Then click Finish.
  3. By default an example function called helloExample is provided whenever a new user routine is created, as follows:
    Information noteNote: The function annotates are optional, but if you want the function to be displayed in a category so that the function can be chosen from the category when editing the code expression, as the below figure showed, you have to specify the {Category} property.
  4. Create a new function called reverseString that is used to reverse a string.
    Information noteNote: If you need to use external JARs in the function, right-click on the routine name in Repository and select the Edit Routine Libraries option to add external JARs.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!