# Importing new tags to overwrite old ones, without collision policy error?

**URL:** <https://forum.inductiveautomation.com/t/importing-new-tags-to-overwrite-old-ones-without-collision-policy-error/27494>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [August 15, 2019, 10:57pm UTC](https://forum.inductiveautomation.com/t/importing-new-tags-to-overwrite-old-ones-without-collision-policy-error/27494 "2019-08-15T22:57:02Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![silverbacknet](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/silverbacknet/32/7385_2.png) [@silverbacknet](https://forum.inductiveautomation.com/u/silverbacknet)\
**Post date:** [August 15, 2019, 10:57pm UTC](https://forum.inductiveautomation.com/t/importing-new-tags-to-overwrite-old-ones-without-collision-policy-error/27494/1 "2019-08-15T22:57:02Z")

</div>

I get this error when importing a set of tags that have been mass-modified externally:

> Bad\_Failure("Tag 'Customer/.../MyTag' already exists, and 'abort' collision policy has been specified")

I know you can script them one at a time through system.tag.configure, but I already have the json ready to import and I just want to do it through the GUI, particularly since this is only the first of several mass-overwrites that I'll need to make. How can I adjust this collision policy?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 15, 2019, 11:12pm UTC](https://forum.inductiveautomation.com/t/importing-new-tags-to-overwrite-old-ones-without-collision-policy-error/27494/2 "2019-08-15T23:12:40Z")

</div>

The right side of the tag import dialog should have a dropdown to set the collision policy:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/92ad71e9827d17c211765631d6f45607def60c36.png)

---

<div class="post-metadata">

**Author:** ![silverbacknet](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/silverbacknet/32/7385_2.png) [@silverbacknet](https://forum.inductiveautomation.com/u/silverbacknet)\
**Post date:** [August 15, 2019, 11:14pm UTC](https://forum.inductiveautomation.com/t/importing-new-tags-to-overwrite-old-ones-without-collision-policy-error/27494/3 "2019-08-15T23:14:07Z")

</div>

I can’t believe I didn’t even notice that. It’s been a long day. Thank you!

---

<div class="post-metadata">

**Author:** ![vcgasman](https://avatars.discourse-cdn.com/v4/letter/v/ecc23a/32.png) [@vcgasman](https://forum.inductiveautomation.com/u/vcgasman)\
**Post date:** [September 16, 2019, 8:07pm UTC](https://forum.inductiveautomation.com/t/importing-new-tags-to-overwrite-old-ones-without-collision-policy-error/27494/4 "2019-09-16T20:07:12Z")

</div>

Just noticed that dropdown myself. The last choice is MergeOverwrite, but this is not detailed in the manual. Can you explain what this option does please?  
Thanks

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [September 16, 2019, 8:25pm UTC](https://forum.inductiveautomation.com/t/importing-new-tags-to-overwrite-old-ones-without-collision-policy-error/27494/5 "2019-09-16T20:25:02Z")

</div>

MergeOverwrite means keep the existing values in the property set, _unless_ there’s a conflict, in which case it will prefer the value from the new property set. This is different from `Overwrite`, which _replaces outright_ whatever was already set in the tag’s configuration.

For an export/import, it shouldn’t matter - the export already has “everything” (that’s not already a default value) defined, meaning it won’t matter. `MergeOverwrite` is used internally by the `editTags` function, since you generally don’t call that function with an entire tag configuration, just a few changes to apply to an existing tag.

---

<div class="post-metadata">

**Author:** ![jsorlie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jsorlie/32/3645_2.png) [@jsorlie](https://forum.inductiveautomation.com/u/jsorlie)\
**Post date:** [August 21, 2022, 7:58pm UTC](https://forum.inductiveautomation.com/t/importing-new-tags-to-overwrite-old-ones-without-collision-policy-error/27494/6 "2022-08-21T19:58:09Z")

</div>

FWIW, this is what it looks like today (2022) using release _ **8.1.19** _ using the Tag Browser’s `Import Tags>Interactive` utility.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/e/2ea793bedbb4a9f684183142c1ebc2070eb4e537.png)

Just a note, the first time I executed this, I clicked **OK** and got an import error. It worked the second time I tried, when I first clicked **Apply** before clicking **OK**.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/a/7a27e8d5fd2e45461d6d399f60d1c41b0e2796a6.png)

```auto
java.lang.IndexOutOfBoundsException: Index 4 out of bounds for length 4
at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Unknown Source)
at java.base/jdk.internal.util.Preconditions.checkIndex(Unknown Source)
at java.base/java.util.Objects.checkIndex(Unknown Source)
at java.base/java.util.ArrayList.get(Unknown Source)
at com.inductiveautomation.ignition.gateway.tags.TagCreator$Session.handleCommit(TagCreator.kt:623)
at com.inductiveautomation.ignition.gateway.tags.TagCreator$Session.modify(TagCreator.kt:434)
at com.inductiveautomation.ignition.gateway.tags.TagCreator$modify$1.invoke(TagCreator.kt:123)
at com.inductiveautomation.ignition.gateway.tags.TagCreator$modify$1.invoke(TagCreator.kt:109)
at com.inductiveautomation.ignition.gateway.tags.TagCreator.sessionMdc(TagCreator.kt:134)
at com.inductiveautomation.ignition.gateway.tags.TagCreator.modify(TagCreator.kt:109)
at com.inductiveautomation.ignition.gateway.tags.TagProviderImpl.lambda$creatorModify$23(TagProviderImpl.java:1012)
at com.inductiveautomation.ignition.gateway.tags.TagProviderImpl.lambda$exec$5(TagProviderImpl.java:462)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

```

@paul-griffith :

Curiously, after this error, the `Import Tags` option in the Tag Browser’s right-click context menu was no longer enabled; only `Export Tags` remained enabled. After restarting the Designer, the import option once again was enabled.

Again, then by first clicking “Apply” and then “OK” the UDT imported successfully overwriting the existing definition.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 22, 2022, 3:11pm UTC](https://forum.inductiveautomation.com/t/importing-new-tags-to-overwrite-old-ones-without-collision-policy-error/27494/7 "2022-08-22T15:11:56Z")

</div>

Do you by any chance have a backup/tag export before the import you attempted, as well as a copy of the actual import you were attempting? That would be a huge help to isolate exactly what’s going wrong.

---

<div class="post-metadata">

**Author:** ![jsorlie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jsorlie/32/3645_2.png) [@jsorlie](https://forum.inductiveautomation.com/u/jsorlie)\
**Post date:** [August 22, 2022, 3:42pm UTC](https://forum.inductiveautomation.com/t/importing-new-tags-to-overwrite-old-ones-without-collision-policy-error/27494/8 "2022-08-22T15:42:20Z")

</div>

Unfortunately I was not that methodical. I could send you a copy of the UDT definition that was in place, and the new version of that UDT that was imported.

One tiny nuance: the JSON-filename did not match the name of the UDT that was being imported. I had manually edited the “name”: “flexSortBarcodes” attribute in the JSON file (to over-write that definition).

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 22, 2022, 3:43pm UTC](https://forum.inductiveautomation.com/t/importing-new-tags-to-overwrite-old-ones-without-collision-policy-error/27494/9 "2022-08-22T15:43:58Z")

</div>

Sure, anything would help. So you had N instances of this tag, then imported a new definition? Or imported to overwrite the instances?

---

<div class="post-metadata">

**Author:** ![jsorlie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jsorlie/32/3645_2.png) [@jsorlie](https://forum.inductiveautomation.com/u/jsorlie)\
**Post date:** [August 22, 2022, 3:45pm UTC](https://forum.inductiveautomation.com/t/importing-new-tags-to-overwrite-old-ones-without-collision-policy-error/27494/10 "2022-08-22T15:45:31Z")

</div>

correct, N instances running the old definition; then import the new definition to overwrite the existing def
