Skip to content

Size

aggregating category: array no `||` resultSize: 1

Returns the number of elements in an ARRAY value as an INT.

Size consumes a single ARRAY pipeline input and returns its length as an INT. It is the array-mode analog of NumberOfResults() — whereas NumberOfResults counts row-level fan-out from multi-sized rules, Size reads the in-memory length of an ARRAY value directly.

Typically used in pipeline form: :arr => Size() => :n or chained after a producer such as GetCDMFieldValue(:f)[].

Parameters

No parameters accepted.

Input type

  • ARRAY

Output type

  • INT

Requires

  • Exactly one ARRAY-typed pipeline input.

Examples

Length of a collected ARRAY (test082)

GetCDMFieldValue(:year_of_birth)[] => Size() => :yb

Length of a previously-bound ARRAY field

:mob_arr => Size() => :mb

Project length straight to a string

GetCDMFieldValue(:year_of_birth)[] => Size() => AsString()

Errors

  • `Size': input must be ARRAY-typed
    The pipeline value reaching the rule is not an ARRAY.
  • `Size' requires exactly one ARRAY input
    Wrong number of pipeline inputs.
  • `Size' does not accept parameters
    A parameter was supplied — the input must come from the pipeline.

See also

NumberOfResults, At, Unique, Remove, Without