# Problem with system.tag.getConfiguration when getting parameters of UDT instance

**URL:** <https://forum.inductiveautomation.com/t/problem-with-system-tag-getconfiguration-when-getting-parameters-of-udt-instance/64534>\
**Category:** Ignition\
**Created:** [September 27, 2022, 2:49pm UTC](https://forum.inductiveautomation.com/t/problem-with-system-tag-getconfiguration-when-getting-parameters-of-udt-instance/64534 "2022-09-27T14:49:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SteveW](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@SteveW](https://forum.inductiveautomation.com/u/SteveW)\
**Post date:** [September 27, 2022, 2:49pm UTC](https://forum.inductiveautomation.com/t/problem-with-system-tag-getconfiguration-when-getting-parameters-of-udt-instance/64534/1 "2022-09-27T14:49:37Z")

</div>

We’re currently running on version 8.1.7 and are using system.tag.getConfiguration to iterate through UDT instances to get certain parameter values.

The code looks like this:

```auto
nodes=system.tag.getConfiguration(path,False)

for item in nodes:
	for key,value in item.iteritems():
		print key,value
		if key=='parameters':
			parameterValueDict=value
			for key,value in parameterValueDict.iteritems():
				print key,value

```

We have multiple UDT types and dozens of instances. The above code will return data for the parameters that looks like this:

```auto
parameters {u'DeviceIP': {datatype=String, value=10.27.16.105}, u'DeviceName': {datatype=String, value=[WS15127_10]}}

```

However, we have **one** UDT that returns a different format, which looks like this:

```auto
parameters {u'DeviceIP': u'10.27.16.180', u'DeviceName': u'[WS15427_10]'}

```

This UDT was originally copied from another UDT and then modified. I deleted the instance and definition then created a new UDT from scratch. The result was the same.

From a code standpoint, I added a try/except to handle both versions of data:

```auto
nodes=system.tag.getConfiguration(path,False)

for item in nodes:
	for key,value in item.iteritems():
		print key,value
		if key=='parameters':
			parameterValueDict=value
			for key,value in parameterValueDict.iteritems():
				print key,value
				if key=='DeviceName':
					parameterValue=value
					try:
						myDeviceName=parameterValue.getValue()
					except:
						myDeviceName=parameterValue

```

This works, but thought I would post to see if anyone has any thoughts on what I may be doing wrong with respect to the UDT setup (or anything else) that would cause this difference. Any input is appreciated.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Rahul\_Vaddepalli](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rahul_vaddepalli/32/39198_2.png) [@Rahul\_Vaddepalli](https://forum.inductiveautomation.com/u/Rahul_Vaddepalli)\
**Post date:** [October 4, 2022, 9:37pm UTC](https://forum.inductiveautomation.com/t/problem-with-system-tag-getconfiguration-when-getting-parameters-of-udt-instance/64534/2 "2022-10-04T21:37:26Z")

</div>

Hi SteveW,

Your script works when I create a UDT instance, maybe try to create the UDT definition from scratch to see if that fixes that. I don't think you're doing anything wrong necessarily.

```auto
parameters {u'DeviceIP': u'10.27.16.180', u'DeviceName': u'[WS15427_10]'}

```

The "u" character indicates a unicode string (which is a way for a string to represent more characters than a regular ASCII string can).

However, if you'd like us to further investigate this, please open up a support ticket with us!  
[https://www.inductiveautomation.com/support/home/](https://www.inductiveautomation.com/support/home/)
