Read from Table to Token

Read from Table to Token

KhadijaM
Not applicable
165 Views
7 Replies
Message 1 of 8

Read from Table to Token

KhadijaM
Not applicable

[ FlexSim 23.1.1 ]

Hi,

Looking for help as a newbie.

I have a table of products (see example below) each with different parameters associated with it.

I would like to be able to generate tokens and add the labels regarding the raw materials from each row to the token (while knowing what each product is). My desired end result is to have for example:

Product A - RawMaterial1 10, RawMaterial2 10.

I would really appreciate any help!


Product A / batchProduct B / batchProduct C / batch
Raw Material 1102022
Raw Material 2102510
0 Likes
Accepted solutions (1)
166 Views
7 Replies
Replies (7)
Message 2 of 8

joerg_vogel_HsH
Mentor
Mentor

@KhadijaM , you store data typically by labels at tokens. So you have to know how to assert a label, declare an initial value, change a label value. On the other hand you need to know how to read a table cell value. I assume you are familiar with value assignments in a programming language. If you aren’t then there are templates you can use from picklist options in triggers or process flow activities. Please look for table and treenode Flexscript Class API in manual.

https://docs.flexsim.com/en/23.1/Reference/CodingInFlexSim/FlexScriptAPIReference/Data/Table.html

https://docs.flexsim.com/en/23.1/Reference/CodingInFlexSim/FlexScriptAPIReference/Tree/treenode.html...

https://docs.flexsim.com/en/23.1/Reference/CodingInFlexSim/FlexScriptAPIReference/Tree/treenode.html...

https://docs.flexsim.com/en/23.1/Reference/CodingInFlexSim/FlexScriptAPIReference/ProcessFlow/Token....

0 Likes
Message 3 of 8

julie_weller
Not applicable
Accepted solution

Hi @KhadijaM! I would just use the schedule source activity. You can set the time they arrive, the quantity, and add any labels you want! Let me know if that helps!

1689601523804.png

Additionally if you wanted more control over the arrivals you could use a date/time source and choose the distribution of when the tokens are created.

0 Likes
Message 4 of 8

JordanLJohnson
Autodesk
Autodesk
.


Jordan Johnson
Principal Software Engineer
>

Message 5 of 8

julie_weller
Not applicable

Hi @khadijam, was my answer helpful? If so, please click the "Accept" button at the bottom of the 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
Message 6 of 8

KhadijaM
Not applicable

Thank you Julie & Jordan, I had forgotten to reply but your answer did help and I'm now able to use a global table as a reference. 🙂 Really appreciate it!

Message 7 of 8

KhadijaM
Not applicable
Thank you Joerg!!
0 Likes
Message 8 of 8

julie_weller
Not applicable
Yay! We're glad to hear it!
0 Likes