# Getting only value from system.opc.readValues

**URL:** <https://forum.inductiveautomation.com/t/getting-only-value-from-system-opc-readvalues/11044>\
**Category:** Ignition\
**Created:** [January 14, 2016, 4:50pm UTC](https://forum.inductiveautomation.com/t/getting-only-value-from-system-opc-readvalues/11044 "2016-01-14T16:50:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rcorkern](https://avatars.discourse-cdn.com/v4/letter/r/90db22/32.png) [@rcorkern](https://forum.inductiveautomation.com/u/rcorkern)\
**Post date:** [January 14, 2016, 4:50pm UTC](https://forum.inductiveautomation.com/t/getting-only-value-from-system-opc-readvalues/11044/1 "2016-01-14T16:50:55Z")

</div>

I am able to get the QualifiedValue from system.opc.readValues for a list of itemPaths, but I only need to get the value. i can get only the value from the system.opc.readValue command using ‘.getValue’:

`server = "KepwareServer"
path = "ns=2:s=Channel1.Device1.121.48.15"
qualifiedValue = system.opc.readValue(server, path)
print "Value: " + str(qualifiedValue.getValue())`

How can this be done with the system.opc.readValues?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 14, 2016, 4:59pm UTC](https://forum.inductiveautomation.com/t/getting-only-value-from-system-opc-readvalues/11044/2 "2016-01-14T16:59:59Z")

</div>

I’m not sure what you’re asking - it seems you’ve answered your own question.

edit: I see - readValue vs readValues

Just map the resulting list of QualifiedValues to values:

```auto
q_values = system.opc.readValues(...)
values = map(lambda qv: qv.getValue(), q_values)
```

---

<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:** [January 14, 2016, 5:20pm UTC](https://forum.inductiveautomation.com/t/getting-only-value-from-system-opc-readvalues/11044/3 "2016-01-14T17:20:14Z")

</div>

> [@Kevin.Herron](#):
>
> Just map the resulting list of QualifiedValues to values:

q\_values = system.opc.readValues(...)  
values = [x.value for x in q\_values]  
[/code]Or even use it as a one-liner:`values = [x.value for x in system.opc.readValues(...)]`Hope this helps. 🙂  
{ I regularly use these shortcuts with system.tag.readAll() }

---

<div class="post-metadata">

**Author:** ![rcorkern](https://avatars.discourse-cdn.com/v4/letter/r/90db22/32.png) [@rcorkern](https://forum.inductiveautomation.com/u/rcorkern)\
**Post date:** [January 15, 2016, 4:21pm UTC](https://forum.inductiveautomation.com/t/getting-only-value-from-system-opc-readvalues/11044/4 "2016-01-15T16:21:01Z")

</div>

Great, thank you!
