question

Ignasi P avatar image
0 Likes"
Ignasi P asked Ignasi P commented

How to set an ItemName that appears on the system and on the dashboard

HI community,

This is a pretty simple question, but I am kinda stuck into it. I am tracking some of my flowitems on a dashbord with item state gannt and the names appear as 1, 2, 3....n. I want those numbers to be the name of a label, which in the example I am posting it comes directly from a label. I tried some code alternatives but none seem to work. Can you tell me the exact code I should use for that?

Thanks a lot in advance,

PD: The code says get "NOMBRE" and the label name is "NAME" but I tried that alternative too. "NOMBRE" is from the code from my orignal flexsim file.

question.fsm

FlexSim 18.2.2
itemname
captura.jpg (177.5 KiB)
question.fsm (19.6 KiB)
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

·
Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Ignasi P commented

Here are the steps you need:

  1. Install the template (double click on the chart, go to Advanced, and click Install, then Ok).
  2. In the Toolbox, open the properties of the Item Trace Gantt Collector
  3. On the Data Recording tab, select the Item column
  4. Change the Value of the Item column to data.token.Item.NAME
  5. Change the Storage Type to String
  6. Reset and Run your model

question-updated.fsm

So why does this work?

A chart template (the Item Trace Gantt chart is a chart template) uses tools like Groups, Process Flow, and Statistics Collectors to generate the data for the chart. Those tools are hidden inside the chart template object. When you install a template, those tools are moved into the toolbox, where you can edit them.

The Statistics Collector is listening to events in a Process Flow. That Process Flow is listening to items in the model. When an item enters a new object, the Process Flow sends a token to a specific activity, and that updates the Statistics Collector. The token has many helpful labels, including a reference to the item that is moving.

So the final code uses data (an object used within the Statistics Collector) to access the token in the process flow, and that token is used to access the item, and the item is used to access the name label. In this way, the Statistics Collector can record the name of the item.

Just be aware that if a second item has an identical name, it will not get a new row in the chart. As long as all your names are unique, you will get the chart you expect.


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

Ignasi P avatar image Ignasi P commented ·

Wow that was much more complicated than expected. Thank you very much for your help, you'll get all my rewards points i have left :)

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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

find answers

Think you know an expert who is sure to have the answer to this question? Reach out and ask them to post an answer.