Free cookie consent management tool by TermsFeed insert() Function
insert() Function

Function

insert( array, value, index )

Inserts a value into the given array and returns the resulting array.

Parameters

Keyword Type Description

array

Any Type Array

The array to modify.

value

Any Type or Any Type Array

The value or values to insert.

index

Integer or Integer Array

The index or array of indices at which the value should be inserted.

Returns

Any Type Array

Usage considerations

An index value less than 1 appends the value to the left-side of the array, and an index value greater than the array length appends the value to the right-side of the array.

Examples

insert({10, 20, 30, 40}, 100, 1) returns 100, 10, 20, 30, 40

insert({10, 20, 30, 40}, 100, 5) returns 10, 20, 30, 40, 100

insert({10, 20, 30, 40}, {100, 200}, 1) returns 100, 200, 10, 20, 30, 40

insert({10, 20, 30, 40}, 100, {1, 2}) returns 100, 10, 100, 20, 30, 40

insert({10, 20, 30, 40}, {100, 200}, {1, 2}) returns 100, 10, 200, 20, 30, 40

Feature compatibility

The table below lists this function's compatibility with various features in Appian.
Feature Compatibility Note
Portals Compatible
Offline Mobile Compatible
Sync-Time Custom Record Fields Compatible

Can be used to create a custom record field that only evaluates at sync time.

Real-Time Custom Record Fields Incompatible
Process Reports Compatible
Process Events Compatible

insert() Function

FEEDBACK