FunctionCopy link to clipboard
joinarray( array, separator )
Concatenates the elements of an array together into one string and inserts a string separator between each element.
ParametersCopy link to clipboard
Keyword | Type | Description |
---|---|---|
|
Any Type Array |
An array of elements to be concatenated. |
|
Text |
A string that will be inserted between each element of the given array. |
ReturnsCopy link to clipboard
Text
Usage considerationsCopy link to clipboard
Acceptable array typesCopy link to clipboard
This function works with any array type, performing a string conversion on each element if necessary.
Null elementsCopy link to clipboard
Null elements cannot be concatenated. For example, joinarray({"", "", "", ""}, "|")
returns null.
Understanding resultsCopy link to clipboard
If no separator value is defined, then the values are concatenated without extra text. For example:
1
2
3
joinarray(
{"Alice", "Donna", "Charles"}
)
Copy
Returns "AliceDonnaCharles"
.
If an array with only one element is entered as the array argument, the function will return only the element and no separator.
ExamplesCopy link to clipboard
Join values with a single separator characterCopy link to clipboard
1
joinarray({1, 2, 3, 4}, "|")
Copy
Returns "1|2|3|4"
.
Join values with multiple separatorsCopy link to clipboard
1
joinarray({1,2,3,4}, " < ")
Copy
Returns "1 < 2 < 3 < 4"
. Extra space is automatically trimmed from the start and end of the returned string.
Create a list of joined value strings with different separatorsCopy link to clipboard
You can provide a list of separator values and Appian returns a List of Text String.
1
2
3
4
joinarray(
{"Alice", "Donna", "Charles"},
{"+", "-"}
)
Copy
Returns {"Alice+Donna+Charles", "Alice-Donna-Charles"}
.
Feature compatibilityCopy link to clipboard
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 | Custom record fields that evaluate in real time must be configured using one or more Custom Field functions. |
Process Reports | Compatible | |
Process Events | Compatible |