List.Insert Method

Inserts an element into the List at the specified index.

Syntax

[Ok := ]  List.Insert(Index: Integer, Value: T)

Parameters

List
 Type: List
An instance of the List data type.

Index
 Type: Integer
The one-based index at which the value should be inserted.

Value
 Type: T
The value to be inserted.

Return Value

Ok
 Type: Boolean
true if the index was within the valid range, otherwise false. If you omit this optional return value and the operation does not execute successfully, a runtime error will occur.

See Also

List Data Type
Getting Started with AL
Developing Extensions