1.3.11.60 Trim Array

The Trim Array processor is used to select a range of elements from within an array. This is used when you need to transform an array into a subset of its elements, by trimming elements either from the beginning or from the end of the array. These elements will be returned in an array format.

The following table describes the configuration options:

Configuration Description

Inputs

  • Input arrays: Any array type (Date Array, Number Array, or String Array).

Options

  • Number of elements: The number of elements to be extracted from the input array. If the input array is shorter than the entered value, or if the entered value is negative or zero, original input array is returned.

  • Start position: The position from where the extraction will begin in the input array depending upon count from end selection.

  • Count from end: Determines whether to start element extraction from the end or the beginning of the input array. By default, elements are extracted from the beginning.

Outputs

  • SubArray: Subarray of the input array which contains the extracted elements.

Output Filters

None

Example

Input Array(s) Length of Result Input Start Position Input Length of Result Property Start Position Property Count from End property Output Array(s)

FirstNames: {Apple, Grape, Jack}

LastNames: (Orange, Goom, Garlic)

1

<Not set>

<Disabled>

1

No

FirstNames: SubArray: (Apple)

LastNames: SubArray: (Orange)

FirstNames: (Apple, Grape, Jack, Matt, Ginger, Carrot, Tom)

LastNames: (Orange, Onion, Garlic, Potatoes, Smith, Banana, Evans)

5

2

<Disabled>

<Disable>

No

FirstNames: SubArray: (Grape, Jack, Matt, Ginger, Carrot)

LastNames: SubArray: (Onion, Garlic, Potatoes, Smith, Banana)

FirstNames: {Apple, Grape, Jack, Matt, Ginger, Carrot, Tom}

LastNames: {Orange, Onion, Garlic, Potatoes, Smith, Banana, Evans}

<Not set>

2

2

<Disable>

Yes

FirstNames: SubArray: {Carrot, Tom}

LastName: SubArray: {Banana, Evans}

FirstNames: {Apple, Grape}

LastNames: {Orange, Onion}

-1

-1

<Disabled>

<Disable>

No

FirstNames: SubArray: {Apple, Grape}

LastNames: SubArray: {Orange, Onion}

FirstNames: {Apple, Grape}

LastNames: {Orange, Onion}

3

<Not set>

<Disabled>

1

No

FirstNames: SubArray: {Apple, Grape}

LastNames: SubArray: {Orange, Onion}

FirstNames: {Apple, Grape}

LastNames: {Orange, Onion}

1

5

<Disabled>

<Disable>

No

FirstNames. SubArray: {}

LastNames. SubArray: {}