# Can't get enabled attribute set with system.tag.editTag

**URL:** <https://forum.inductiveautomation.com/t/cant-get-enabled-attribute-set-with-system-tag-edittag/18201>\
**Category:** Ignition\
**Tags:** ignition78, scripting\
**Created:** [May 29, 2018, 6:08pm UTC](https://forum.inductiveautomation.com/t/cant-get-enabled-attribute-set-with-system-tag-edittag/18201 "2018-05-29T18:08:38Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![codersmurf](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@codersmurf](https://forum.inductiveautomation.com/u/codersmurf)\
**Post date:** [May 29, 2018, 6:08pm UTC](https://forum.inductiveautomation.com/t/cant-get-enabled-attribute-set-with-system-tag-edittag/18201/1 "2018-05-29T18:08:38Z")

</div>

Here’s the one of the lines I’m using:

system.tag.editTag(tagPath=’[]’ + unit + ‘/CompMotorVoltage’, attributes={“Enabled”:“false”})

The unit var is correct, as I use it in a line above to a tag in the same udt above this line. I’m running this in the console and using this line to run it:

shared.Units.toggleCompVFD(‘180-8586’)

I do have the read/write toggled in the designer set and like I said get no errors anywhere. The tag above this line is set, just the attributes on the other tags don’t get set.

Thanks

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 29, 2018, 6:14pm UTC](https://forum.inductiveautomation.com/t/cant-get-enabled-attribute-set-with-system-tag-edittag/18201/2 "2018-05-29T18:14:39Z")

</div>

Have you tried all lower case for “enabled” ?

---

<div class="post-metadata">

**Author:** ![codersmurf](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@codersmurf](https://forum.inductiveautomation.com/u/codersmurf)\
**Post date:** [May 29, 2018, 6:22pm UTC](https://forum.inductiveautomation.com/t/cant-get-enabled-attribute-set-with-system-tag-edittag/18201/3 "2018-05-29T18:22:16Z")

</div>

Same issue. It’s not letting me replay with less than 20 characters so this sentence is filler:).

---

<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:** [May 29, 2018, 6:25pm UTC](https://forum.inductiveautomation.com/t/cant-get-enabled-attribute-set-with-system-tag-edittag/18201/4 "2018-05-29T18:25:49Z")

</div>

There’s no tag provider specified? You’re using square brackets to indicate that you have a fully qualified path, but (at least in the snippet posted) there’s no provider actually entered. I wouldn’t be surprised if that didn’t work.

---

<div class="post-metadata">

**Author:** ![codersmurf](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@codersmurf](https://forum.inductiveautomation.com/u/codersmurf)\
**Post date:** [May 29, 2018, 6:27pm UTC](https://forum.inductiveautomation.com/t/cant-get-enabled-attribute-set-with-system-tag-edittag/18201/5 "2018-05-29T18:27:14Z")

</div>

A provider would be like [default]?

---

<div class="post-metadata">

**Author:** ![codersmurf](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@codersmurf](https://forum.inductiveautomation.com/u/codersmurf)\
**Post date:** [May 29, 2018, 7:42pm UTC](https://forum.inductiveautomation.com/t/cant-get-enabled-attribute-set-with-system-tag-edittag/18201/6 "2018-05-29T19:42:51Z")

</div>

So how do I set the tag provider, is this the device, the documentation mentions a tag provider but never concretely tells me what a provider is, I’ve been looking through the documentation and it’s only mentioned as if it’s common knowledge. 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:** [May 29, 2018, 8:07pm UTC](https://forum.inductiveautomation.com/t/cant-get-enabled-attribute-set-with-system-tag-edittag/18201/7 "2018-05-29T20:07:38Z")

</div>

I’d recommend starting in the docs [here](https://docs.inductiveautomation.com/display/DOC79/Understanding+Tags#UnderstandingTags-WhatareTagProviders?); basically, tag providers are collections of tags that all come from a single source. In probably 90% of Ignition projects, there’s only the one, called `default` - but if you use remote providers (new in 7.9) or a module such as Cirruslink’s MQTT then you may have additional realtime tag providers. Also, the `System` and `Client` meta-folders you see in the tag browser in the designer are technically additional tag providers.

---

<div class="post-metadata">

**Author:** ![codersmurf](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@codersmurf](https://forum.inductiveautomation.com/u/codersmurf)\
**Post date:** [May 29, 2018, 8:38pm UTC](https://forum.inductiveautomation.com/t/cant-get-enabled-attribute-set-with-system-tag-edittag/18201/8 "2018-05-29T20:38:32Z")

</div>

K, so it’s 7.8 and I’ve tried using both default and Default, Enable and enable and True and true, all of them do nothing.

---

<div class="post-metadata">

**Author:** ![codersmurf](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@codersmurf](https://forum.inductiveautomation.com/u/codersmurf)\
**Post date:** [May 29, 2018, 10:14pm UTC](https://forum.inductiveautomation.com/t/cant-get-enabled-attribute-set-with-system-tag-edittag/18201/9 "2018-05-29T22:14:14Z")

</div>

Is there another way to do this, getAttribute works, I use it to find out if a tag is enabled, but there is no setAttribute. Here are the 2 calls to system.tag:

system.tag.write(’[]’ + unit + ‘/InterfaceCompVFD’, True)  
system.tag.editTag(tagPath=’[]’ + unit + ‘/CompDCBusVoltage’, attributes=“Enabled”:True})

The first call succeeds the second call does not, as if it just doesn’t work. If there’s another way I’m game. I would just leave the tag there and disable the interface but the tag will literally be polling a none existent device if it’s kept enabled on units that don’t support it. I have 12 of these tags on 5 udt’s and the 12 are split into 2 sets of 6 that can have either enabled so I would need to create quite a few more udt’s to handle it that way for a script function that seems like it should work. I know I can just enable it by hand when applicable but wanted to make sure if I’m unable to someone else can with as little pain as possible. Thx

---

<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:** [May 29, 2018, 10:39pm UTC](https://forum.inductiveautomation.com/t/cant-get-enabled-attribute-set-with-system-tag-edittag/18201/10 "2018-05-29T22:39:18Z")

</div>

If you can’t get onto 7.9 (there’s at least one bugfix for editTag coming in 7.9.8, so it’s entirely possible there’s a bug in 7.8) you can try writing directly to the Enabled subproperty as a workaround, eg:  
`system.tag.write("[provider]path/to/tag.Enabled", False)`

---

<div class="post-metadata">

**Author:** ![codersmurf](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@codersmurf](https://forum.inductiveautomation.com/u/codersmurf)\
**Post date:** [May 29, 2018, 11:24pm UTC](https://forum.inductiveautomation.com/t/cant-get-enabled-attribute-set-with-system-tag-edittag/18201/11 "2018-05-29T23:24:53Z")

</div>

That worked, thx everybody.
