ArrayUnique function (LotusScript® Language)

Removes duplicate elements from an Array.

Note: This function is new with Domino® Release 6.


ArrayUnique( sourceArray [ ,compMethod ])



Array of any type.


Optional Integer specifying the type of comparison to use when searching for the delimiter, if the elements are strings.


Comparison Mode


case sensitive, pitch sensitive


case insensitive, pitch sensitive


case sensitive, pitch insensitive


case insensitive, pitch insensitive

If you omit compMethod, the default comparison mode is the mode set by the Option Compare statement for this module. If there is no statement for the module, the default is case sensitive and pitch sensitive.

Return value

Returns an array with duplicates removed. For any elements of the array which compare equal, the first occurrence is copied into the result array.


Elements in a variant array will only compare equal if they are of the same type. The variant array can't contain classes or objects.

Array elements that contain the null value will match other null values.

Array elements that are empty will match with other elements that are empty.

Error handling

ArrayUnique throws a Run-time Type mismatch if:

  • the first parameter is not an array
  • a list is passed instead of an array
  • the array passed in has not been properly initialized
  • the array is of classes
  • the array is of NotesDocuments
  • the array contains an array as an element
  • the array contains nothing as an element

ArrayUnique throws a run-time Wrong Number of Dimensions error if the array is not one-dimensional.

See examples

Examples: ArrayUnique function