question

Zhun Z avatar image
0 Likes"
Zhun Z asked Logan Gold commented

Statistics Collectors

I want use Statistic Collectors to get the data from List by listen to the list. i can get the Partition ID but i failed to get the content, could someone tell me how to do this?

1717646178714.png

FlexSim 22.2.0
statistic collector
1717646178714.png (180.3 KiB)
· 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.

Logan Gold avatar image Logan Gold ♦♦ commented ·

Hi @Zhun Z, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Felix Möhlmann commented

Outside of querying the list (only possible if it's a global list) you can't. By listening to the On Push event you access to the pushed value, so you could use the same expression that is used to calculate the value of the list field for the column in the Statistics Collector. It looks like in the screenshot it's just a label on the pushed value?

What is your goal here? Do you want to store information about each value that was pushed to the list or do you want to generate aggregate information based on the current state of the list. If it's the latter, the option "Track Number Field Totals" might be of use to you.

· 2
5 |100000

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

Zhun Z avatar image Zhun Z commented ·

Thanks, Flexsim code :"List("ItemList1").stats.partitionContent(data.partitionID).value", can get the field value.

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Zhun Z commented ·
If it is the content of the partition, yes. From your screenshot it wasn't clear if the field is a label on the pushed value, a push argument or a partition statistic.
0 Likes 0 ·