question

Adam C avatar image
0 Likes"
Adam C asked Adam C answered

Statistics collector column set that retrieves bundle label data?

I would like to create a Column Set that retrieves the values from a bundle label. Trying to do so in a single column returns an error "Invalid cast from Variant to Table" when trying to access the label cast as a table. I have accessed bundle labels in similar fashion outside of statistics collectors. Is there something unique about StatisticsCollector.collectedData to cause this?

statisticscollector-column-bundlelabelvalue.fsm

statistics collectorbundle labelcolumn set
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Adam C avatar image
0 Likes"
Adam C answered

Instead of storing data on a bundle label on the flowitem and retrieving with a statistics collector, I instead used a milestone collector.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered

It is not the Statistics Collector. It is the Table() API. A label value is a Variant value, and you must first cast the Variant as a treenode or text, and then pass that into the table constructor:

Table(data.item.bundleLabel.as(treenode))[1][1]
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.