# editTag not working as expected (\>= 7.9.4)

**URL:** <https://forum.inductiveautomation.com/t/edittag-not-working-as-expected-7-9-4/16347>\
**Category:** Ignition\
**Created:** [December 18, 2017, 3:51pm UTC](https://forum.inductiveautomation.com/t/edittag-not-working-as-expected-7-9-4/16347 "2017-12-18T15:51:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amarth](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarth/32/3313_2.png) [@Amarth](https://forum.inductiveautomation.com/u/Amarth)\
**Post date:** [December 18, 2017, 3:51pm UTC](https://forum.inductiveautomation.com/t/edittag-not-working-as-expected-7-9-4/16347/1 "2017-12-18T15:51:06Z")

</div>

Hello all,

I guess I have found a regression in the system.tag.editTag method.

Since version 7.9.4, i cannot override properties in a nested child UDT. I have made a parent UDT, containing a child UDT. Each one contains a simple integer value. (See joined files)

On a 7.9.5 (and on 7.9.4 also I guess), I can override the value at the root of the Parent UDT, but not the other ones.  
The exact same UDT and code works perfectly on a 7.9.3 (all values can be overriden)

The code is executed from the Script Console, in the Designer (not from a Vision Client). I also disabled the tag permission “Tag Editing” (just to be sure).

Steps to reproduce:  
Import Enfant.xml  
Import Parent.xml  
Instanciate a Parent in root directory. Name it “testTag”  
Run the script.

Works for \<= 7.9.3. Does not work on 7.9.5.

```auto
valeurAEcrire = system.date.getSecond(system.date.now())
system.tag.editTag(tagPath = "tagTest", overrides = {"Repertoire/Valeur":{"Value": valeurAEcrire}} )
system.tag.editTag(tagPath = "tagTest", overrides = {"Enfant/Valeur":{"Value": valeurAEcrire}} )
system.tag.editTag(tagPath = "tagTest", overrides = {"Repertoire/Enfant/Valeur":{"Value": valeurAEcrire}} )
system.tag.editTag(tagPath = "tagTest", overrides = {"Valeur":{"Value": valeurAEcrire}} )

```

[Enfant.xml](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/7d03d213562b76fc0c4dc19474925a08fd577941.xml) (344 Bytes)  
[Parent.xml](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/e966dd053eadd7da2f4ab54d13e70ae436c38651.xml) (1.0 KB)

---

<div class="post-metadata">

**Author:** ![WildeKurt](https://avatars.discourse-cdn.com/v4/letter/w/50afbb/32.png) [@WildeKurt](https://forum.inductiveautomation.com/u/WildeKurt)\
**Post date:** [January 2, 2018, 2:44pm UTC](https://forum.inductiveautomation.com/t/edittag-not-working-as-expected-7-9-4/16347/2 "2018-01-02T14:44:05Z")

</div>

I have had problems with overriding parameters as well with editTag. I wasn’t aware it was a version thing. My workaround has been to only use addTag. If the tag exists, remove it and recreate. Thanks for pointing that out.

Kurt

---

<div class="post-metadata">

**Author:** ![jlteel](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@jlteel](https://forum.inductiveautomation.com/u/jlteel)\
**Post date:** [March 26, 2018, 6:12pm UTC](https://forum.inductiveautomation.com/t/edittag-not-working-as-expected-7-9-4/16347/3 "2018-03-26T18:12:08Z")

</div>

I just ran into this same problem today. The release notes for 7.9.6 don’t indicate that this has been corrected. Did you ever find a workaround?

---

<div class="post-metadata">

**Author:** ![Amarth](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarth/32/3313_2.png) [@Amarth](https://forum.inductiveautomation.com/u/Amarth)\
**Post date:** [March 29, 2018, 7:32am UTC](https://forum.inductiveautomation.com/t/edittag-not-working-as-expected-7-9-4/16347/4 "2018-03-29T07:32:14Z")

</div>

I event found any valid workaround for that (except deleting the tag and recreate it).  
Howerver, I recently got updated by the support that this problem will be corrected for a future version (surely 7.9.8).

---

<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:** [March 29, 2018, 4:56pm UTC](https://forum.inductiveautomation.com/t/edittag-not-working-as-expected-7-9-4/16347/5 "2018-03-29T16:56:21Z")

</div>

Yes, this was a known regression - the fix is in 7.9.8.

---

<div class="post-metadata">

**Author:** ![oisin.gribben](https://avatars.discourse-cdn.com/v4/letter/o/9d8465/32.png) [@oisin.gribben](https://forum.inductiveautomation.com/u/oisin.gribben)\
**Post date:** [July 9, 2018, 1:24pm UTC](https://forum.inductiveautomation.com/t/edittag-not-working-as-expected-7-9-4/16347/6 "2018-07-09T13:24:23Z")

</div>

Hi, I have the same issue now.  
It edits the parent UDT instead of the child.  
Do you have any ideas?

---

<div class="post-metadata">

**Author:** ![bfuson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfuson/32/4597_2.png) [@bfuson](https://forum.inductiveautomation.com/u/bfuson)\
**Post date:** [September 30, 2019, 5:31pm UTC](https://forum.inductiveautomation.com/t/edittag-not-working-as-expected-7-9-4/16347/8 "2019-09-30T17:31:58Z")

</div>

I have had success in updating nested UDT subtag properties with editTag, but only for nested UDTs that are one level deep. It seems the function doesn’t behave well with tags that are under 2 or more levels of UDTs.

I have the following structure:

- Root UDT (params)
  - myRootTag
  - Level 1 UDT (params)
    - myLevel1Tag
    - Level 2 UDT (params)
      - myLevel2Tag

The editTag parameters are as follows:

```auto
system.tag.editTag(
    tagPath = '[default]DirectoryPath/Root UDT/Level 1 UDT/ Level 2 UDT',
    overrides = {'/myLevel2Tag' : {'OPCServer' : 'myServer', 'ScanClass' : 'myScanClass'}}
)

```

The above syntax does not seem to work. I need to update ~100 of these tags.

---

<div class="post-metadata">

**Author:** ![bfuson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfuson/32/4597_2.png) [@bfuson](https://forum.inductiveautomation.com/u/bfuson)\
**Post date:** [September 30, 2019, 8:00pm UTC](https://forum.inductiveautomation.com/t/edittag-not-working-as-expected-7-9-4/16347/9 "2019-09-30T20:00:22Z")

</div>

I was using the wrong format ☹

What does work:

```auto
system.tag.editTag(
    tagPath = '[default]DirectoryPath/Root UDT',
    overrides = {'/Level 1 UDT/Level 2 UDT/myLevel2Tag' : {'OPCServer' : 'myServer', 'ScanClass' : 'myScanClass'}}
)

```
