Add elements to a list
Overview
The add deluge task is used to add elements to an existing list.
Syntax
<list_variable>.add( <expression> );
Parameter | Description |
---|---|
<list_variable> | List variable to which elements will be added. |
<expression> | Element to be added to the list. You can directly specify the element, or you can specify an expression, i.e. a combination of values, constants, variables, operators, functions and so on, which evaluates to the required element. Points to remember for this parameter:
|
This task can be used in the following events
When a record is Created | ||
On Load | Yes | |
On Validate | Yes | |
On Success | Yes | |
On User input | Yes | |
Subform on add row | Yes | |
Subform on delete row | Yes | |
When a record is Created or Edited | ||
On Load | Yes | |
On Validate | Yes | |
On Success | Yes | |
On User input | Yes | |
Subform on add row | Yes | |
Subform on delete row | Yes | |
When a record is Edited | ||
On Load | Yes | |
On Validate | Yes | |
On Success | Yes | |
On User input | Yes | |
Subform on add row | Yes | |
Subform on delete row | Yes | |
When a record is Deleted | ||
On Validate | Yes | |
On Success | Yes | |
Other workflow events | ||
On a scheduled date | Yes | |
During approval process | Yes | |
During payment process | Yes | |
In a Custom Function | Yes | |
In an Action item in report | Yes |
Examples
1) 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(1);
listVar.add("Harry");
2) The following sample snippet fetches all records from the "Employees" form, and retrieves the "email" field value from each record. The list of email values is added to the "EmailList" variable.
EmailList = list();
EmailList.add(Employees[ID!=0].email.getall());
EmailList.add(Employees[ID!=0].email.getall());