append( array, value )
Appends a value or values to the given array, and returns the resulting array.
See also:
Keyword | Type | Description |
---|---|---|
|
Any Type Array |
The array to modify. |
|
Any Type or Any Type Array |
The value or values to append. |
Any Type Array
The array to be modified can contain items of one or more types. When all array items are a single type, the value must be the same type as the current items in the array. The updated array will be a List of that type. For example, append({10, 20}, 30)
returns 10, 20, 30
, a List of Number (Integer).
Any values that are not the same type will not be added. For example, append({10, 20, 30, 40}, "fifty")
returns 10, 20, 30, 40, null
because the text value ("fifty"
) cannot be added to an array of numbers.
An array with values of more than one type returns a List of Variant. For example, append({10, "twenty"}, 30)
returns 10, "twenty", 30
.
You can append values of any type to these mixed-type arrays. For example, append({10, "twenty"}, 30.15)
returns 10, "twenty", 30.15
, a list of variant types with an integer, text string, and decimal.
1
2
3
4
append(
{10, 20, 30, 40},
50
)
Returns {10, 20, 30, 40, 50}
. When the array contains items of one type, the value must be the same type.
If value is not the same type, a null is appended. For example:
1
2
3
4
append(
{10, 20, 30, 40},
"fifty"
)
Returns {10, 20, 30, 40, null}
because the text value cannot be added to an array of numbers.
1
2
3
4
append(
{},
{60, 70}
)
Returns {60, 70}
.
1
2
3
4
append(
{10, 20, 30, 40},
{50, 60, 70}
)
Returns {10, 20, 30, 40, 50, 60, 70}
.
1
2
3
4
5
append(
{"Red", "Green"},
{"Blue", "Yellow"},
{"Brown", "White"}
)
Returns {"Red", "Green", "Blue", "Yellow", "Brown", "White"}
.
When appending a Number (Decimal) value to an array of Number (Integer), Appian will round the decimal value to the nearest integer.
1
2
3
4
append(
{10, 20},
30.49
)
Returns {10, 20, 30}
.
1
2
3
4
append(
{10, 20},
30.5
)
Returns {10, 20, 31}
.
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 | Custom record fields that evaluate in real time must be configured using one or more Custom Field functions. |
Process Reports | Incompatible | Cannot be used to configure a process report. |
Process Events | Incompatible | Cannot be used to configure a process event node, such as a start event or timer event. |
append() Function