question

Anthony C5 avatar image
0 Likes"
Anthony C5 asked Anthony C5 commented

How to access a token value for statistic report purpose

model1.fsm

Hi, i have a process flow "Transport task for handler 1", and i would like to create a statistic report that shows the destination of the flow item for each loading task. In my statistic collector "Handler1_Move_Tracking", i create a column "Destination" which point to "token.FlowItem.destination.destination" . But it had exception error "Flexscript Error MODEL:/Tools/StatisticsCollectors/Handler1_Move_Tracking>stats/liveColumns/Destination/valueNode Line 6 Data type void does not support property destination" . How do i resolve this?

source code attached.

thanks.

FlexSim 20.0.0
flexsim 20.0.0how to access token value on statistic collector
model1.fsm (2.7 MiB)
5 |100000

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

1 Answer

tannerp avatar image
0 Likes"
tannerp answered Anthony C5 commented

@Anthony C5,

I'm looking at your Stats Collector and I think the first thing is that the "token" is not referencing the token that it seems like it is. The information for the Stats Collector is stored under "data", and not "token". That said, your listening event doesn't actually carry a reference to the token, but rather the task sequence passed to Handler1. So if you're looking for the task sequence itself, you would reference it using the code below:

data.ts1 //returns the task sequence assigned to Handler1

Now from there, I'm not sure how to get the destination you're looking for, to be honest. But maybe you're aware of how that works. Hopefully this helps!

· 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.

Anthony C5 avatar image Anthony C5 commented ·

thanks for the insight

0 Likes 0 ·