reverse( array )
Returns an array in reverse order.
Keyword | Type | Description |
---|---|---|
|
Any Type Array |
The array to modify. |
Any Type Array
1
reverse({10, 20, 30, 40})
Returns {40, 30, 20, 10}
.
Note: These CDT values are for reference only. If you copy and paste this expression, it will not evaluate.
1
2
3
4
5
6
7
8
a!localVariables(
local!customer: {
'type!Customer'(customerId: 5),
'type!Customer'(customerId: 2),
'type!Customer'(customerId: 3),
},
fn!reverse(local!customer)
)
Returns {'type!Customer'(customerId: 3), 'type!Customer'(customerId: 2), 'type!Customer'(customerId: 5)}
.
1
2
3
4
5
6
7
a!localVariables(
local!maps: {
a!map(1: "a"),
a!map(2: "b")
},
fn!reverse(local!maps)
)
Returns {a!map('2': "b"), a!map('1': "a")}
.
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 |
reverse() Function