# TagConfiguration.get(\<string\>) not working

**URL:** <https://forum.inductiveautomation.com/t/tagconfiguration-get-string-not-working/16140>\
**Category:** Ignition\
**Created:** [November 27, 2017, 10:41pm UTC](https://forum.inductiveautomation.com/t/tagconfiguration-get-string-not-working/16140 "2017-11-27T22:41:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![salbrechtsen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/salbrechtsen/32/18660_2.png) [@salbrechtsen](https://forum.inductiveautomation.com/u/salbrechtsen)\
**Post date:** [November 27, 2017, 10:41pm UTC](https://forum.inductiveautomation.com/t/tagconfiguration-get-string-not-working/16140/1 "2017-11-27T22:41:59Z")

</div>

This code:

```auto
tags = system.tag.browseConfiguration("parent", True)
for tag in tags:
	print tag.get("value")

```

is returning this error

```auto
TypeError: get(): "1st arg can't be coerced to com.inductiveautomation.ignition.common.config.Property"

```

in the Script Console. We are running 7.9.5.

Essentially, TagConfiguration.get is not accepting a string as the property name as described [here](https://docs.inductiveautomation.com/display/DOC79/system.tag.browseConfiguration). TagConfiguration.get is working when I pass in a Property object from TagConfiguration.getProperties(). Is this a bug in 7.9.5 or am I missing something?

---

<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:** [November 27, 2017, 10:51pm UTC](https://forum.inductiveautomation.com/t/tagconfiguration-get-string-not-working/16140/2 "2017-11-27T22:51:16Z")

</div>

.get() there doesn’t accept a string. You’ll have do something like:

```auto
from import com.inductiveautomation.ignition.common.sqltags.model import TagProp
tags = system.tag.browseConfiguration("parent", True)
for tag in data:
	print tag.get(TagProp.Value)

```

See the constants [here](http://files.inductiveautomation.com/sdk/javadoc/ignition79/793/com/inductiveautomation/ignition/common/sqltags/model/TagProp.html) for other possibilities.

---

<div class="post-metadata">

**Author:** ![salbrechtsen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/salbrechtsen/32/18660_2.png) [@salbrechtsen](https://forum.inductiveautomation.com/u/salbrechtsen)\
**Post date:** [November 27, 2017, 10:57pm UTC](https://forum.inductiveautomation.com/t/tagconfiguration-get-string-not-working/16140/3 "2017-11-27T22:57:11Z")

</div>

The documentation at the link I provided just states

> TagConfiguration - A list of TagConfiguration objects. Attributes on the object may be read by calling get("propertyName").

Thats where I was under the impression that it accepts a string.

---

<div class="post-metadata">

**Author:** ![Robert.McKenzie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/robert.mckenzie/32/4134_2.png) [@Robert.McKenzie](https://forum.inductiveautomation.com/u/Robert.McKenzie)\
**Post date:** [November 28, 2017, 12:07am UTC](https://forum.inductiveautomation.com/t/tagconfiguration-get-string-not-working/16140/4 "2017-11-28T00:07:53Z")

</div>

Sorry about that, this is an oversight in the documentation. The .get() function currently takes in a property object, not a string. You can loop through the non-default properties like the first example on the [system.tag.browseConfiguration] ([https://docs.inductiveautomation.com/display/DOC79/system.tag.browseConfiguration](https://docs.inductiveautomation.com/display/DOC79/system.tag.browseConfiguration)) user manual page.

```auto
tagConfig = system.tag.browseConfiguration("[default]", False)
for tag in tagConfig:
    propList = tag.getProperties()
    for prop in propList:
        #Print the property name and value.
        print "Property '%s' has a value of '%s'" % (prop, tag.get(prop))

```

---

<div class="post-metadata">

**Author:** ![salbrechtsen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/salbrechtsen/32/18660_2.png) [@salbrechtsen](https://forum.inductiveautomation.com/u/salbrechtsen)\
**Post date:** [November 28, 2017, 12:18am UTC](https://forum.inductiveautomation.com/t/tagconfiguration-get-string-not-working/16140/5 "2017-11-28T00:18:02Z")

</div>

Thanks for updated the documentation! I’ll find a way to do what I need.
