arrayboth
ARRAYONE
,
ARRAYTWO
,
SEPARATOR
,
ARRAYBOTH

The arrayboth statement creates a new array from two existing arrays. The new array contains only items that are in both of the original arrays.


Parameters

This statement has four parameters:

arrayone – the first array.

arraytwo – the second array.

separator – the separator character or characters. Both of the original arrays must use the same separator, and the output array will also use this separator.

arrayboth – the new array that contains all elements that are in both arrayone and arraytwo.


Description

The Arrayboth statement creates an new array from two existing arrays. The new array contains only items that are in both of the original arrays. The output array will be sorted alphabetically. Empty array elements, if any, will not be included in the output array, even if both of the original arrays contain empty elements.

This example will display colors that both Jack and Jill like – specifically blue,red,white.

local jacksColors,jillsColors,combinedColors
jacksColors = "red,green,orange,blue,white"
jillsColors = "black,white,red,blue"
arrayboth jacksColors,jillsColors,",",combinedColors
message combinedColors ☞ blue,red,white

See Text Arrays for more information about arrays. Note: This operation can also be done in a formula using the arrayboth( function.


See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0 but more than one character is now allowed for use as the separator parameter.