### Select

Category

Structuring

Function

Selects a member of a group or a list.

Syntax

    object = Select(input, which);

Inputs

Name | Type | Default | Description
--- | --- | --- | ---
`input` | group, series, value list, string list | none | the object from which one or more members are to be selected
`which` | integer, integer list, string list | 0 | the member(s) to be selected
`except` | flag | 0 | 0: copy all listed members 1: copy all but listed members

Outputs

Name | Type | Description
--- | --- | ---
`object` | object | the selected member(s)

Functional Details

`input` | is a series or group from which items are to be selected.

`which`

specifies the item(s) to be selected.

If `input` is:

- a series or group: the module selects items
  - by name if `which` is a string or string list.
  - by index in the group if `which` is an integer or integer list.
- a list: `which` must be an integer or integer list, and the module selects the corresponding items.

If this parameter is not specified, the module selects the first (0th) object.

Note: Members of a series can be selected only by ordinal number, not by series position. For both groups and lists, counting begins at 0 (zero).

`except` | specifies whether `which` is to be interpreted as an inclusive or exclusive selection list.

Notes:

1. Since the components of fields are typically arrays (lists), you can select a particular position as follows:

     Use Extract to extract the "positions" component.

     Use Select on that array, setting `which` to the appropriate value (e.g., 7 for the eighth position).

   You can also use the Select module to select individual frames from a data series, passing the Sequencer output to `which`.

2. If you pass a series to Select, and that series has groups of fields as members, the output of Select is one of the groups of fields. Selecting a single field from one of these groups requires two calls to Select: the first to select the group of fields, and the second to select the individual field.

3. If `which` is a string, Select finds the object with that name only if it lies at the top hierarchical level of the `input` passed to Select.

Components

All input components are propagated to the output.

Example Visual Programs

    ConnectingScatteredPoints.net
    GeneralImport1.net
    GeneralImport2.net
    PlotTwoLines.net
    UsingTextAndTextGlyphs.net

See Also

Collect, CollectNamed, CollectSeries, List

[ OpenDX Home at IBM | OpenDX.org ]