# Extracting custom associated properties returns domain values

**URL:** <https://forum.inductiveautomation.com/t/extracting-custom-associated-properties-returns-domain-values/20804>\
**Category:** Ignition\
**Tags:** sdk, ignition79, python\
**Created:** [November 13, 2018, 4:16pm UTC](https://forum.inductiveautomation.com/t/extracting-custom-associated-properties-returns-domain-values/20804 "2018-11-13T16:16:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![agn](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@agn](https://forum.inductiveautomation.com/u/agn)\
**Post date:** [November 13, 2018, 4:16pm UTC](https://forum.inductiveautomation.com/t/extracting-custom-associated-properties-returns-domain-values/20804/1 "2018-11-13T16:16:53Z")

</div>

I'm currently attempting to extract the associated properties and values of active alarm objects without having to use regex.

The following code returns a list of objects containing the active properties.

[code]\>\>auAlarmList = system.alarm.queryStatus(status=["ActiveUnacked"])

> > for x in auAlarmList:  
> > adList = x.activeData  
> > print adList  
> > {label=My label text, name=Alarm, eventValue=false, myAssociatedProperty=myPropertyValue}  
> > [/code]

When I add the following I successfully get a list of lists with property names:

`>>print adList.properties
[label, name, eventValue, myAssociatedProperty]
`

However, when I add the following in an attempt to retrieve the value of the previously named properties, I get this:

`>>print adList.values
[com.inductiveautomation.ignition.common.config.PropertyValue@4222e0f5, com.inductiveautomation.ignition.common.config.PropertyValue@17c18633, ...]`

What is returned here exatcly? I assume it's something other than the associated values. Maybe the value of the actual property.

---

<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:** [November 13, 2018, 4:32pm UTC](https://forum.inductiveautomation.com/t/extracting-custom-associated-properties-returns-domain-values/20804/2 "2018-11-13T16:32:28Z")

</div>

`adList` is some implementing class of `PropertySet` - so when you call `values` (which Jython knows means [`getValues()`](http://files.inductiveautomation.com/sdk/javadoc/ignition79/795/com/inductiveautomation/ignition/common/config/PropertySet.html#getValues--) you’re getting a list of [`PropertyValues`](http://files.inductiveautomation.com/sdk/javadoc/ignition79/795/com/inductiveautomation/ignition/common/config/PropertyValue.html) back - which themselves have a `getValue()` method.

Try:

```auto
print [propertyValue.value for propertyValue in adList.values]

```

---

<div class="post-metadata">

**Author:** ![agn](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@agn](https://forum.inductiveautomation.com/u/agn)\
**Post date:** [November 13, 2018, 8:17pm UTC](https://forum.inductiveautomation.com/t/extracting-custom-associated-properties-returns-domain-values/20804/3 "2018-11-13T20:17:06Z")

</div>

Worked great. Thank you.

```auto

>>auAlarmList = system.alarm.queryStatus(status=["ActiveUnacked"])
>>for x in auAlarmList:
>>	adList = x.activeData
>>	adList.properties
>>	print [propertyValue.value for propertyValue in adList.values]
>> # ap = associated property, av = associated value

[ap1, ap2, ap3...]
[u'av1', u'av2', u'av3'...]

```
