Collect Values (ModelBuilder)

Summary

Collects output values from an iterator or converts a list of values into a single input with multiple values.

Learn how Collect Values works in ModelBuilder

Usage

  • This tool is only available from the ModelBuilder ribbon for use in models. The tool is not available from the Geoprocessing pane or from Python.

  • The Output Values parameter value can be used as input to tools with multivalue parameters including the Merge, Append, Mosaic, and Cell Statistics tools. The Output Table parameter value can be used to export the collected values to a table.

  • Note:

    When you initially add tools to ModelBuilder, the tools are in a not-ready-to-run state with gray color because the required parameter values have not been specified. Unlike these tools, the Collect Values tool is always in a ready-to-run state with yellow color. This is because the input to the tool can be empty, which is considered a valid input. Similar to the Collect Values tool, the If Value Is, If Data Exists, and Merge Branch tools also accept empty input.

  • Tool outputs that are model parameters are added to the map display using the variable name. If you are using an iterator in the model and want to add the outputs of all the iterations to display in the map with the actual unique output name instead of the name of the variable, connect the output to be displayed to the Collect Value tool, right-click the output of Collect Value, and make it a model parameter.

  • The Collect Values tool can be used to add tool outputs to the map display without displaying the output parameters in the Geoprocessing pane. For example, if your model uses the output parameter of the Buffer tool as a model parameter, when you run your model in the Geoprocessing pane, the parameter is visible and the output location can be modified.

    However, if you want to prevent the output location from being modified, do the following:

    1. Connect the Buffer tool's output parameter to the Collect Values tool.
    2. Right-click the Buffer tool's output parameter and uncheck Parameter to remove the model parameter.
    3. Right-click the Collect Values tool's Output Values parameter and check Parameter to add the model parameter.

    When the model is run from the Geoprocessing pane, the output parameter will not be shown and cannot be modified. When the tool is run, the output will still be added to the map because the output of Collect Values tool is derived.

Parameters

LabelExplanationData Type
Input Value

The input values to be collected.

Any Value
Output Table
(Optional)

The output table with the collected values.

Table

Derived Output

LabelExplanationData Type
Output Values

The collected values.

Any Value

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics