> For the complete documentation index, see [llms.txt](https://docs.geodin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.geodin.com/integrations-and-plug-ins/overview/attach-reports.md).

# Attach Reports

This workflow attaches GeoDin-generated PDF reports to the corresponding borehole points in ArcGIS Pro, so each feature carries its geotechnical report as an attachment.

{% embed url="<https://www.youtube.com/watch?v=Xo-wNWrR5TY&list=PLfA_dsMIot34WQYVtEluk87UsZt0hb21A&index=2>" %}

> **Video chapters:** 0:00 Preparing your data in ArcGIS Pro | 0:12 Enabling attachments on the dataset | 0:28 Reviewing the attribute table | 0:46 Spotting naming discrepancies | 0:58 Creating a field to correct names | 2:09 Generating the attach key | 2:25 Adding the table with geoprocessing | 3:18 Adding the attachments | 4:03 Verifying the results

## Requirements

* The borehole point feature class in a **file geodatabase** - attachments are a geodatabase feature (created in [Export to ArcGIS Pro](/integrations-and-plug-ins/overview/export-to-arcgis-pro.md)).
* The per-object report PDFs in one folder (created in [Generate Reports](/integrations-and-plug-ins/overview/generate-reports.md) with **Create a PDF per object**).

### Step 1: Open the target dataset

In the **Catalog** pane, locate the feature class that will receive the attachments and open its **Properties**.

<figure><img src="/files/VLt1u1QrMg15ppnjzpzH" alt=""><figcaption><p>Catalog pane - right-click the feature class and choose Properties</p></figcaption></figure>

### Step 2: Enable attachments

On the **Manage** tab of the feature class properties, enable **Attachments**. This must be done before any files can be attached.

<figure><img src="/files/htgXlyRKBhsgD0gtwaFj" alt=""><figcaption><p>Enabling attachments on the dataset</p></figcaption></figure>

### Step 3: Compare borehole names to report file names

Open the attribute table and compare the **Full location name** values against the PDF file names. Feature names use `/` (for example, `BH2/CPT2`) while the exported PDFs use `_` (`BH2_CPT2.PDF`) - so a matching key is needed.

<figure><img src="/files/r9ckUyWZsMCoXD8P7a2Y" alt=""><figcaption><p>The attribute table with the Full location name values</p></figcaption></figure>

<figure><img src="/files/p4hzXLBP65ccue9mfWiD" alt=""><figcaption><p>The report folder - underscores in the file names</p></figcaption></figure>

### Step 4: Create a matching field for attachment keys

Add a new field named **AttachKey** with **Data Type = Text**, then **save** the field changes - an unsaved field cannot be populated. Afterwards, open **Calculate Field** on the new column.

<figure><img src="/files/ykY8zm4tDskIe5DkDios" alt=""><figcaption><p>Adding a field in the attribute table</p></figcaption></figure>

<figure><img src="/files/D2tWYRtu3hiCxwKskgjY" alt=""><figcaption><p>Field name AttachKey, data type Text</p></figcaption></figure>

<figure><img src="/files/2AKe01ZX3DAaFMqFH7pP" alt=""><figcaption><p>Saving the field changes</p></figcaption></figure>

<figure><img src="/files/MgTjmTysHv2OBM4J8leB" alt=""><figcaption><p>Calculate Field on the AttachKey column</p></figcaption></figure>

### Step 5: Calculate the attachment key and verify the match

Calculate the key by replacing the slash with an underscore:

```python
AttachKey = !Full_location_name!.replace("/", "_")
```

Verify the populated column matches the report file names exactly - even small differences in punctuation or spacing prevent a match.

<figure><img src="/files/gGAv8e4zgJBN0JcrDH7P" alt=""><figcaption><p>The replace expression in Calculate Field</p></figcaption></figure>

<figure><img src="/files/AT9T8i755tr1JwVPEjds" alt=""><figcaption><p>The corrected AttachKey column</p></figcaption></figure>

### Step 6: Create the attachment match table

Run the **Generate Attachment Match Table** geoprocessing tool:

* **Input Dataset**: the feature class.
* **Input Folder**: the folder with the report PDFs.
* **Key Field**: `AttachKey` - **Input Data Filter**: `*.pdf`.

<figure><img src="/files/pCIRkAQxWN3cgb6iiEpf" alt=""><figcaption><p>Finding Generate Attachment Match Table in Geoprocessing</p></figcaption></figure>

<figure><img src="/files/GNtq7Dg7bBS8qE1QyF69" alt=""><figcaption><p>Match table parameters - Key Field AttachKey, filter *.pdf</p></figcaption></figure>

### Step 7: Add the attachments

Run **Add Attachments** with **Input Join Field** = `OBJECTID`, the match table from step 6, **Match Join Field** = `MatchID`, **Match Path Field** = `Filename`, and the report folder as the working folder. Click **Run**.

<figure><img src="/files/vPFPZMfK7O5CEZcvY01n" alt=""><figcaption><p>The Add Attachments tool</p></figcaption></figure>

<figure><img src="/files/NNRFaf2I09CJlqYvOnwz" alt=""><figcaption><p>Join fields OBJECTID and MatchID, path field Filename</p></figcaption></figure>

### Step 8: Check the final results

Click borehole points on the map and confirm each pop-up carries its PDF report as an attachment. Spot-check a few records of both types.

<figure><img src="/files/BZ0lJbVBKO9iFbmF4Dnx" alt=""><figcaption><p>A borehole pop-up with the attached report</p></figcaption></figure>

<figure><img src="/files/pN8FZ4xpPf2Vm8llQPea" alt=""><figcaption><p>Opening the attached PDF from the pop-up</p></figcaption></figure>

***

## Working with attachment matching

The key exists because two naming conventions meet here: GeoDin object names carry `/`, exported file names carry `_`. The `*.pdf` filter keeps stray files out of the match table, and spot-checking after each major step (key calculated, table generated, attachments added) catches problems while they are still one step away from their cause.

For the equivalent workflow with 3D ground-model annotations from Civil 3D, see [Attaching geotechnical reports to borehole annotations](https://docs.geodin.com/geodin-ground/workflows-and-integrations/arcgis-pro-attach-reports) in the GeoDin Ground documentation.

***

**Next step:** [Publish the data with attachments to ArcGIS Online](/integrations-and-plug-ins/overview/publish-to-arcgis-online.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.geodin.com/integrations-and-plug-ins/overview/attach-reports.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
