FINDDUPLICATES

FINDDUPLICATES(array, include_first_instance, ignore_blanks)[source]

Identifies duplicate elements in an array and returns a boolean array.

FINDDUPLICATES scans array and returns a boolean array of the same length, where True indicates that the corresponding element is considered a duplicate. Behavior can be customised using include_first_instance and ignore_blanks.

Parameters:
  • array (Operand) – The array to check for duplicates. Must be a valid array type or object array.

  • include_first_instance (Operand | bool) – Determines whether the first occurrence of a duplicate should be marked as True. If True, the first occurrence is included; if False, only subsequent duplicates are marked.

  • ignore_blanks (Operand | bool) – Determines whether blank values (null or empty strings) should be ignored in duplicate detection.

Return type:

Formula

Returns:

A formula object that evaluates to a boolean array of the same length as array, where True indicates a duplicate element according to the specified rules.

Raises:

ValueError

  • If array is not an array type - If include_first_instance or ignore_blanks is not BOOLEAN

Examples

Basic usage including first instance:

FINDDUPLICATES(
    ["A", "B", "A", "C"],
    include_first_instance=True,
    ignore_blanks=False
)
# Returns [True, False, True, False]

Excluding first instance:

FINDDUPLICATES(
    ["A", "B", "A"],
    include_first_instance=False,
    ignore_blanks=False
)
# Returns [False, False, True]

``array`` — accepted types

  • BOOLEAN_ARRAY

  • DATETIME_ARRAY

  • DATE_ARRAY

  • DECIMAL_ARRAY

  • INTEGER_ARRAY

  • OBJECT_ARRAY

  • STRING_ARRAY

  • TIME_ARRAY

``include_first_instance`` — accepted types

  • BOOLEAN

``ignore_blanks`` — accepted types

  • BOOLEAN

Return types

  • BOOLEAN_ARRAY