Skip to main content

Generate Attachment Match Table (Data Management Tools)

Summary

Creates a match table to be used with the Add Attachments and Remove Attachments tools.

Learn more about working with the Attachments geoprocessing tools

Usage

  • This tool will evaluate each row in the input target dataset and compare the Key Field parameter values to the names of supported media files in the Input Folder parameter value. For each match that occurs, a record will be created in the output table that contains the Object ID value from the input dataset and the name of the matched files (or optionally the full path to the files). When used with the Add Attachments and Remove Attachments tools, the MATCHID field is used as the key field to link one or more files on disk to records in the input dataset.

  • If the Output Match Table parameter value is a folder, the output can be created as a dBASE table by specifying a name with the .dbf extension. If the output location is a geodatabase, the match table will be a geodatabase table (do not specify an extension).

Parameters

Label Explanation Data type

Input Dataset

A dataset containing records that will have files attached.

Table View

Input Folder

A folder containing files to attach.

Folder

Output Match Table

The output match table with the MATCHID and FILENAME fields.

Table

Key Field

The field from which values will be used to match the names of the files from the input folder. The matching behavior will compare field values with each file name, disregarding the file extension. This allows multiple files with various file extensions to match a single record in the input dataset.

For example, a field value of lot5986 will match a file named lot5986.jpg if the Match Pattern parameter value is Exact.

Field

Input Data Filter

(Optional)

A data filter that will be used to limit the files considered for matching.

Wild cards (*) can be used for more flexible filtering options. Multiple filters delimited by semicolons are also supported.

For example, you have an input directory with a variety of file types. To limit the possible matches to only .jpg files, , use a value of .jpg. To limit the possible matches to only .pdf and .doc files, use a value of .pdf; *.doc.

To limit possible matches to only file names that contain the text arc, use a value of arc.

String

Store Relative Path

(Optional)

Specifies whether the output match table field FILENAME will contain full paths or only the file names.

  • CheckedThe field will contain only the file names (relative paths). This is the default.

  • UncheckedThe field will contain full paths.

Boolean

Match Pattern

(Optional)

Specifies the type of match pattern that will be used to match file names with the specified Key Field parameter value.

  • ExactFile names that are an exact match to the values in the key field will be matched. This is the default.

  • PrefixFile names that have the key field value at the beginning of the file name will be matched.

  • SuffixFile names that have the key field value at the end of the file name will be matched.

  • AnyFile names that have the key field value anywhere in the file name will be matched.

String

Environments

This tool does not use any geoprocessing environments.

Licensing information

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