remove( array, index )
Removes the value at a given index from an array, and returns the resulting array.
Keyword | Type | Description |
---|---|---|
|
Any Type Array |
The array to modify. |
|
Integer or Integer Array |
The one-based index or array of indices whose values should be removed. |
Any Type Array
The index value must be greater than or equal to 1.
Passing an empty array to the array parameter returns an empty array.
Passing an empty array to the index parameter returns the original array value.
1
remove({10, 20, 30, 40}, 4)
Returns {10, 20, 30}
.
1
remove({10, 20, 30, 40}, {2, 4})
Returns {10, 30}
.
1
2
3
4
a!localVariables(
local!list: { 1, 2, 3, null, 4 },
remove(local!list, count(local!list) - 1)
)
Returns {1, 2, 3, 4}
.
Note: These CDT values are for reference only. If you copy and paste this expression, it will not evaluate. Use this as a reference only.
1
2
3
4
5
6
7
8
9
10
a!localVariables(
local!customers: {
'type!{urn:com:appian:types:AS:FS}AS_FS_Customer'(customerId: 1),
'type!{urn:com:appian:types:AS:FS}AS_FS_Customer'(),
'type!{urn:com:appian:types:AS:FS}AS_FS_Customer'(customerId: 2),
'type!{urn:com:appian:types:AS:FS}AS_FS_Customer'()
},
local!newCustomers: wherecontains(tointeger(null), local!customers.customerId),
remove(local!customers, local!newCustomers)
)
Returns {'type!Customer'('customerId': 1), 'type!Customer'('customerId': 2)}
.'
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 | Compatible | |
Process Events | Compatible |
remove() Function