Get Field Value (ModelBuilder)

Summary

Returns the value of the first row of a table for the specified field.

Learn how Get Field Value works in ModelBuilder

Usage

  • This tool is intended for use in ModelBuilder, not in Python scripting.

  • This tool differs from the Iterate Field Value tool as only the first row of the input table is read, and the value of the specified field in this row becomes the output.

Syntax

arcpy.mb.GetFieldValue(in_table, field, {data_type}, {null_value})
ParameterExplanationData Type
in_table

Input table to get the value from.

Table View
field

Input field to get the value from. The value of the first record will be output.

Field
data_type
(Optional)

The data type of the output.

String
null_value
(Optional)

The value to use for null values. The default is 0 for numbers and blank ("") for strings.

String

Derived Output

NameExplanationData Type
value

The value of the first row of a table for the specified field.

Any Value

Environments

This tool does not use any geoprocessing environments.

Licensing information

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