getDataset from root container

I made a root container dataset property to query a database and get all of my data for a part.
I tried to use getDatasetValueByName in an expression on a label to get a value out of the root container dataset that i created but that seems to be the wrong implementation of that.

So may question is how can I get specific data out of a custom property dataset?

Just put row and column in square brackets in your binding expression after the property reference. I generally include the try() function to catch missing datasets during startup. Something like this for the value in the first row, first column:

try({Root Container.SomeProperty}[0, 0], 0)

The row and column can be other properties, of course. And the column can be a string column name instead of an index.

That works perfect.

Where is this in the help file, so next time I have an idea where to look.

https://docs.inductiveautomation.com/display/DOC80/Expression+Overview+and+Syntax#ExpressionOverviewandSyntax-DatasetAccess

2 Likes