Read vales of Dataset Tag

I'm trying to read the values of a tag dataset using system.tag.readBlocking but it gaves me this result:
[[Dataset [47R ⅹ 1C], Good, Thu Apr 17 11:34:44 MST 2025
I tried to point to a value like this:
result = system.tag.readBlocking(["[default]PLC/TestTag[0]"]

I found a couple topics about something similar but is a litle old when the function system.tag.read was available.

The value of a Dataset tag is the dataset.

result = system.tag.readBlocking(["[default]PLC/TestTag"])[0]

result is a QualifiedValue here. You can get the dataset value doing something like:

ds = result.value

Then you can index into the dataset value or call functions on it.

1 Like

Well, a list of qualified values, because who doesn't love extra subscripts.

So:

listOfQualifiedValues = system.tag.readBlocking(["[default]PLC/TestTag"])
theFirstQualifiedValue = listOfQualifiedValues[0]
theDatasetInsideThatQualifiedValue = theFirstQualifiedValue.value

Or all together:

ds = system.tag.readBlocking(["[default]PLC/TestTag"])[0].value
2 Likes

Oh yeah, I forgot the [0].

1 Like

I did it once, but I didn't think it would give me the data set as I needed, my bad.
Thanks for your help, both of you!