Skip to main content

Custom Functions


For some personalized data processing scenarios, you can customize functions to handle them quickly.

  • The function supports the following language: Javascript.

  • The function can only feed one value.

  • Custom functions use asynchronous updates and run in a separate thread without blocking the UI.

  • Function will be actively terminated if no result is returned within 1 second.

  • Custom functions can be used only when assigning default values to fields. It is not available in the operation node of the workflow (available in the the code block node).

Example

The following example describes how to receive field values in a function, how to output function results, etc.

Scenario:

1. Entrance

When setting the default value for the date of birth field, select [Function calculation], and then start the custom function.

2. Write the code for the custom function

How to receive field values

Define variables in the function header to receive the field value, for the part after the equal sign, directly click the field on the left.

Return function result

  • Write the returned content directly after [return].

  • Or return the variable after receiving the result of the calculation via the variable.

3. Save the function

4. Test


Have questions about this article? Send us feedback