arraydifference(
ARRAYONE
,
ARRAYTWO
,
SEPARATOR
)

The arraydifference( function creates a new array from two existing arrays. The new array contains only items that are in the first array but not in the second array.


Parameters

This function has three parameters:

arrayone – the first array.

arraytwo – the second array.

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


Description

This function creates a new array from two existing arrays. The new array contains only items that are in the first array but not the second array. The output array will be sorted alphabetically. Empty array elements, if any, will not be included in the output array, even if the first array contains empty elements and the second array doesn’t.

arraydifference("red,green,orange,blue,white","black,white,red,blue",",") ☞ green,orange

The next example is exactly the same, except that the order of the arrays has been swapped.

arraydifference("black,white,red,blue","red,green,orange,blue,white",",") ☞ black

See Text Arrays for more information about arrays.


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.