Ignition doesn't have any native functionality to convert your structure to a table-compatible format. I created an add-on module to help with cases like this, but what you are after isn't simple. (Natively, Ignition expressions cannot perform any iteration.)
I would use a custom property to construct a dataset of the tagpaths you need. Something like this:
unionAll(
asMap('tagpath', 'str'),
flatten(
forEach(
100,
forEach(
asList('eSeverity', 'sMessage', 'sSource', 'sTimestamp'),
asList( // unionAll needs lists of lists.
stringFormat(
'[someProvider]stEvents/stEvents_%d_/%s',
idx(1),
it()
)
)
)
)
)
)
Then I'd use tags()
to monitor the live values of all of those, and wrap it in grouping to yield four columns. Something like this:
unionAll(
asMap(
'tagFolder', 'str',
'eSeverity', 'I',
'sMessage', 'str',
'sSource', 'str',
'sTimestamp', 'str'
),
forEach(
groupBy( // extract the four leaf tags together as groups
forceQuality(
tags({Root Container.eventsTags}), // yields two-column dataset, path and value
192
),
left( // trim off the last name of the path
it()[0], // path column
lastIndexOf(it()[0], '/')
)
),
transform(
lastIndexOf(it()[0], '/'), // grouping key output
asMap( // unionAll can also take a map with keys==colName
asPairs(
asMap('tagFolder', left(it()[0], value())),
forEach(
it()[1], // Nested dataset
substring(it()[0], value()+1), // path from row of nested DS
it()[1] // value from row of nested DS
)
)
)
)
)
)
Then you can use my where()
and/or orderBy()
functions for additional operations.
(Untested. Tweak to suit.)