Choose where you’d like to start

Create list

Table of Contents

Overview

The create list deluge task is used to declare a list variable.

Syntax

To declare a list variable

<variable> = List();

To declare a list variable with a string element, or list elements

<variable> = List( <value> );

To create a list with elements

<variable> = {<element1>, <element2>, <element3> ...... <elementN>} ;
ParameterDescription
<variable>

Variable which will hold the list elements.

<value>

Applicable data types are Text and List.

Only one string value can be specified at a time. If the text value has a comma, words (or empty strings) on either side of the comma will be considered as individual list elements.

<element>

Elements to be added to the list.

The elements can either be enclosed in curly brackets({}) or square brackets([]).

Elements of different data-types can be accommodated in the same list. All data-types are applicable.

This task can be used in the following events

When a record is Created
On LoadYes
On ValidateYes
On SuccessYes
On User inputYes
Subform on add rowYes
Subform on delete rowYes
When a record is Created or Edited
On LoadYes
On ValidateYes
On SuccessYes
On User inputYes
Subform on add rowYes
Subform on delete rowYes
When a record is Edited
On LoadYes
On ValidateYes
On SuccessYes
On User inputYes
Subform on add rowYes
Subform on delete rowYes
When a record is Deleted
On ValidateYes
On SuccessYes
Other workflow events
On a scheduled dateYes
During approval processYes
During payment processYes
In a Custom FunctionYes
In an Action item in reportYes

Examples

1) The following sample snippet creates a list variable named "colors", and adds the elements "red","blue" and "green" to it.

colors = {"red","blue", "green"};

2) The following sample snippet creates a list variable "listVar" and adds the elements 1(an integer) and "Harry"(string) to it.

listVar=list();
listVar.add(1);
listVar.add("Harry");

Get Started Now

Execute