# Using system.tag.readBlocking and turning into string

**URL:** <https://forum.inductiveautomation.com/t/using-system-tag-readblocking-and-turning-into-string/57984>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [April 4, 2022, 1:45am UTC](https://forum.inductiveautomation.com/t/using-system-tag-readblocking-and-turning-into-string/57984 "2022-04-04T01:45:08Z")\
**Posts on this page:** 1\
**Showing post:** 12

<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:** [April 4, 2022, 9:08pm UTC](https://forum.inductiveautomation.com/t/using-system-tag-readblocking-and-turning-into-string/57984/12 "2022-04-04T21:08:36Z")

</div>

Let’s start from first principles.

When you use [`system.tag.readBlocking`](https://docs.inductiveautomation.com/display/DOC81/system.tag.readBlocking), the return value is a _list_ of [`QualifiedValue`](https://docs.inductiveautomation.com/display/DOC81/Scripting+Object+Reference#ScriptingObjectReference-QualifiedValue) objects.

To extract the _first_ element of the list, use subscript `0` to retrieve the first element: `qualifiedValue = listOfValues[0]`. Now you have a `QualifiedValue` object. To retrieve the _actual value_, which can be _any_ type, use `getValue()`, or, better, `.value`: `actualValue = qualifiedValue.value`.  
The type of `value` at this point will be whatever the tag’s type is, per @josborn’s post above.  
If your tag is _not_ a string, _and you actually need to do a string formatting operation_, you can ask it for its string representation using the Python builtin `str` function. _This is a lossy operation_ - the string representation of an object is not guaranteed to and indeed almost never does encode as much information as the actual type.

You should drive logic from the string representation of a value approximately **never**. For presentation, sure, it’s fine, although if you have a richer type you might still lose information (even a simple floating point might not be represented the way you want it to be if you simply call `str`).

---

_[View the full topic](https://forum.inductiveautomation.com/t/using-system-tag-readblocking-and-turning-into-string/57984)._
