Skip to main content

Create Function

Add Function

Follow the below steps to create a new function:

  1. From the explorer menu, right-click Event Handlers and Functions in an interface (or) master layout (or) component and select Add Function.
  2. In the properties panel, configure the properties as required and then click save.
PropertyDescriptionComments
Name*Provide the name of a function.Name must start with a character followed by alphanumeric or ''. No spaces are allowed. Except underscore (), no other special characters are allowed. Name cannot start with a number.
Async Operation*Specify whether the event handler function should execute asynchronously or synchronously.Select "Yes" if the operation should be asynchronous, otherwise select "No".
DescriptionProvide a brief description of the function.Describe the purpose or functionality of the function.
Is ActiveIndicate whether the function is active or not.-
note

An asterisk (*) denotes that the property is mandatory for creating an event.

The "function added successfully" message displays upon successful creation.

  1. The designer canvas shows the Start and Stop constructs by default. From the ribbon, add the required constructs and configure them as required inside the flow to create a logic. For more information on constructs, refer to Configure Constructs.
  2. Click save.

The "function updated successfully" message displays upon successful update.

Add Function - Step 1 Add Function - Step 2

Structure of a Function​

The created function contains the following:

  • Variables
  • Input Parameters
  • Output Parameter

Function Structure

Add Input Parameters, Output Parameter, and Variables​

Users can add the parameters and variables to a function as applicable. To add, follow the below steps:

  1. Right-click the Input Parameters, Output Parameter (or) Variables and select Add. A pop-up window displays.
  2. Configure the below properties as required and the click Save.
PropertyDescriptionComments
Name*Provide the name of a parameter/variable.Name must start with a character followed by alphanumeric or ''. No spaces are allowed. Except underscore (), no other special characters are allowed. Name cannot start with a number.
Is ArraySpecify whether the parameter is an array.By default, it is set to No.
Type*Select the data type of the parameter from the drop-down.-
Default ValueProvide the default value as required.-
note

An asterisk (*) denotes that the property is mandatory for creating a parameter or variable.

The success message displays upon successfully adding a parameter or variable.

Add Parameter to Function

Constructs​

The following are the constructs available in a function:

Constructs in a Function
If
Continue
Switch
Navigation
Form Dirty Check
Logout
Run Liquid Transformation
Create Anonymous Object
WhenAll