Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 1.6 KB

File metadata and controls

52 lines (40 loc) · 1.6 KB
title description ms.author ms.date ms.tgt_pltfrm ms.topic author
List.Insert(Integer, T) Method
Inserts an element into the List at the specified index.
solsen
02/26/2024
na
reference
SusanneWindfeldPedersen

List.Insert(Integer, T) Method

Version: Available or changed with runtime version 1.0.

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

[Optional] 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.

Remarks

The type T is a dynamic type. When List is of type Text then T will change to Text. When List is of type Integer, then T will change to Integer.

See Also

List Data Type
Get Started with AL
Developing Extensions