# Adding agents via workbench causing duplicates

**URL:** <https://speciforum.org/t/adding-agents-via-workbench-causing-duplicates/1473>\
**Category:** Get Help\
**Created:** [December 19, 2023, 10:02pm UTC](https://speciforum.org/t/adding-agents-via-workbench-causing-duplicates/1473 "2023-12-19T22:02:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fergashl](https://avatars.discourse-cdn.com/v4/letter/f/77aa72/32.png) [@fergashl](https://speciforum.org/u/fergashl)\
**Post date:** [December 19, 2023, 10:02pm UTC](https://speciforum.org/t/adding-agents-via-workbench-causing-duplicates/1473/1 "2023-12-19T22:02:55Z")

</div>

I’m using the workbench to upload some collection objects and I noticed that it has created a duplicate of myself. How do I prevent this from happening? I had a column for last name, first name, and middle initial for the cataloger.

---

<div class="post-metadata">

**Author:** ![Grant](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/grant/32/4255_2.png) [@Grant](https://speciforum.org/u/Grant)\
**Post date:** [January 5, 2024, 1:06am UTC](https://speciforum.org/t/adding-agents-via-workbench-causing-duplicates/1473/2 "2024-01-05T01:06:58Z")

</div>

Hi @fergashl,

Specify only creates a new Agent if any of the values in the `Last Name`, `Middle Name`, and `First Name` fields differ from the data stored in those fields in your agent’s record. Note that **any difference** between a field in your WorkBench data set and existing Agent record will cause a duplicate to be created.

To make the matching behavior ignore fields with blank values, allowing the WorkBench to match a first name and last name to an agent record that includes a middle initial (if it’s not included in the spreadsheet), you can change that behavior by clicking on the :gear_: next to the field mapping:

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/c/c533ba3ab35d563c78ecc9bef88d971702a4783c.png)

You can configure the WorkBench mapping to ensure that all records in a particular table (such as Agent) match existing ones in your database.

You can click on Must Match in the mapping interface:

 ![Must Match button](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/7/707560cda46dfdb17991c8c3515ba171a63a3b17.png)

From here, you can make it so that all agents must match ones that already exist in your database.

![Matching Logic dialog](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/4/40b0d9a68ce466d4c671a4d08fc6c8140b60280f.png)

This will highlight Agent records that do not match existing records in **red** preventing you from uploading.

---

<div class="post-metadata">

**Author:** ![fergashl](https://avatars.discourse-cdn.com/v4/letter/f/77aa72/32.png) [@fergashl](https://speciforum.org/u/fergashl)\
**Post date:** [January 12, 2024, 8:08pm UTC](https://speciforum.org/t/adding-agents-via-workbench-causing-duplicates/1473/3 "2024-01-12T20:08:49Z")

</div>

The names in each of the fields for Last Name, Middle Name, and First Name matched. Could it be that I am listed as Dr. in the database or is it only supposed to recognize those three fields?

---

<div class="post-metadata">

**Author:** ![Grant](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/grant/32/4255_2.png) [@Grant](https://speciforum.org/u/Grant)\
**Post date:** [January 12, 2024, 8:35pm UTC](https://speciforum.org/t/adding-agents-via-workbench-causing-duplicates/1473/4 "2024-01-12T20:35:01Z")

</div>

Specify should only match based on the fields that are present in the import. The only way it could create a duplicate would be if there is some difference in another field (so if you had a ‘Title’ field in the import document but it conflicted with the “Dr.” title in the database since it was empty or mismatched).

---

<div class="post-metadata">

**Author:** ![fergashl](https://avatars.discourse-cdn.com/v4/letter/f/77aa72/32.png) [@fergashl](https://speciforum.org/u/fergashl)\
**Post date:** [January 12, 2024, 8:57pm UTC](https://speciforum.org/t/adding-agents-via-workbench-causing-duplicates/1473/5 "2024-01-12T20:57:33Z")

</div>

Gotcha, I think what I did was put a period after the middle initial, whoops! Thanks!

---

<div class="post-metadata">

**Author:** ![Amelie](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/amelie/32/2472_2.png) [@Amelie](https://speciforum.org/u/Amelie)\
**Post date:** [June 20, 2024, 9:11pm UTC](https://speciforum.org/t/adding-agents-via-workbench-causing-duplicates/1473/6 "2024-06-20T21:11:02Z")

</div>

I encounter the same situation. I re-import the exact same file to make sure that the data match and it creates duplicates.
