Choose where you’d like to start

Remove elements based on index

Table of Contents

Overview

The remove index deluge task removes an element from a list based on a specified index, and returns that element.

Index refers to the position of elements in a list, and it starts from 0. So the index of the first element in the list will be 0, of the second element will be 1, and so on.

Syntax

<variable> = <list_variable>.remove(<index>);
ParameterDescription

<variable>

(optional)

Variable which will contain the returned value.

<list_variable>

The list variable from which an element has to be removed and returned.

Data type is List.

<index>

Index of the element which needs to be removed from the list and returned.

Value should not be a negative number. If a negative number is specified, or the index is not found, a runtime error will be encountered. 

Value should not exceed the list size. Ideally, this limit will be list size minus 1, since index starts from 0.
 
Data type is Number.

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

Example

The following snippet removes "Tuesday" from the "days" list.

days={"Monday", "Tuesday", "Wednesday", "Thursday", "Friday"};
days.remove( 1 );

Get Started Now

Execute