Error getting tags :
error 404Error getting tags :
error 404 combine | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
combine
Basics
Expander triangle
Type
Command
Syntax

combine array {using | by | with} primaryDelimiter [and secondaryDelimiter]

combine array {using | by | with} {row | column}

Introduced
1.1
Changed
2.8.1
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Transforms an array into a list.
Examples

combine myArray using comma
combine monthlyReceivables using return and ";"
combine myArray by row
combine myArray by column

Additional Comments
Expander triangle

Use the combine command to display an array in a field or to process an array using string operators, functions, and chunk expressions.

Parameters:

The arrayName is an array variable.

The primaryDelimiter is a character whose ASCII value is in the range 1 to 127, or an expression that evaluates to such a character.

The secondaryDelimiter is a character (other than the primaryDelimiter) whose ASCII value is in the range 1 to 127, or an expression that evaluates to such a character.

Comments:

The combine command combines the elements of the array into a single variable. After the command is finished executing, the variable specified by array is no longer an array.

If the first form of the command is used, the elements of the original array are separated by the primaryDelimiter. For example, if the primaryDelimiter is return, the content of each element of the original array appears on a separate line.

If you specify a secondaryDelimiter, the key corresponding to each element is added to the element's content, separated from the content by the secondaryDelimiter. For example, if the primaryDelimiter is return and the secondaryDelimiter is tab, each line of the resulting variable contains an element's key, a tab character, and the element's content. If you don't specify a secondaryDelimiter, then the keys are lost in the transformation.

Note: The order of the elements is not alphabetical or chronological; it is based on the internal hash order of the array. To alphabetize the list, use the sortcommand:

combine monthlyReceivables using return and comma

sort lines of monthlyReceivables by item 2 of each

If the second form of the command is used, the elements of the original array are considered to be either columns or rows, separated by the columnDelimiter or rowDelimiter respectively.

Combining an array by row converts the array into a table with rows separated by the rowDelimiter. Each row in the resulting string is the contents of the corresponding key in the array.

Combining an array by column converts the array into a table with columns separated by the columnDelimiter. Each column of the resulting string is the contents of teh corresponding key in the array.

Note: The combine by row and combine by column forms can only be used with numerically keyed arrays

Changes to Revolution

The combine by row / column form was added in 2.8.1

User Comments
Expander triangle
User thumbnail
MikeKerner@RMKCo.com
StarStarStarStarStar
Dec 9, 2010
Combine only works for single-dimension arrays.