JIANYUAN, HALLEY L avatar image

How to use global table to assign the correct labels to each item created?

Hello all,

Is it possible to assign labels to individual items produced using global tables and thereby allow the items to travel to the destination specified in the global table?

I've tried connecting individual sources to release items as according to the global table and letting individual processor/sink to push/pull items respectively according to their labels but there seems to be an issue.

Items are stuck on the processors are not moving to sink/processor to their next destinations.

I've checked other answers for similar issues but those could only work having only one source and it doesn't allow for different arrival timings of each labels. Would using classes to differentiate each item work better in the item flow process? Also, is it necessary to specify the movement of items from each source to the sink itself if there are more nodes?

Here is the end product of the model to simulate and this is the simplified version I was testing to get it to work.


Thanks for reading!

global table3d modelitem flow
flexsim-model.jpg (25.2 KiB)
test-6.fsm (33.7 KiB)
5 |100000 characters needed characters left characters exceeded

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

1 Answer

· Write an Answer
Braydn T avatar image
Braydn T answered JIANYUAN, HALLEY L commented


First, you are not using the global table lookup command correctly, as you can see in the exceptions in the system console. You need to specify the row.

Second, You are assigning the label in the processors to to current.centerobjects[1], which would be an operator. To assign it to the object that is entering or leaving, you just need to say "current".

I am not sure what you mean by arrival timings of labels. If you know a destination from the beginning, wouldn't you assign labels onCreation?

· 5
5 |100000 characters needed characters left characters exceeded

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

test-7.fsmHello @Braydn T,

Thank you for answering for queries. The reason why I didn't specify the row was because I needed the source to produce the items/tokens simultaneously with varying arrival times in the entire column.

Understood, I've removed the centerobjects[1] part in the equation. It was probably a mistake when I was copying the code over from a previous suggestion.

Based on what you've mentioned I've decided to try set label by percentage from the onCreation trigger in the source and let the sink pull all items with the label value "item.Sink(no)" but the items doesn't seems to be pulled as expected, even those that are directly downstream of the processors. I've also tried open port bycase in Sink 2 but that didn't pull items from any ports as well.

Do I have to specify each pathing items should take throughout the model? If so, what's the best pulling/pushing strategy? I can only use 3D model as the main demonstration but should I design it via process flow?

0 Likes 0 ·
test-7.fsm (34.8 KiB)

I would not use any pull strategies, and use a port by case for output. Determine how many potential paths there are, assign a number to each one, and in the port by case code you can say for example:

if(item.path == 2){

return 3;


so if this is the second type of path, it will go to port 3 in this instance.

0 Likes 0 ·

Hello @Braydn T,

I've tried and it seems to work but the output doesn't seem to match the initial setting as there are not enough items being sent to sink 1. Could you help take a look?


0 Likes 0 ·
test-9.fsm (27.9 KiB)

I can take a look, but without knowing all your parameters, it would not do you much good. How many are you expecting? Also, you should be returning a number, not an object. So instead of outObjects[1], it should just be 1.

0 Likes 0 ·

Assuming 3 places altogether, so source 1 goes to sink 2&3, source 2 goes to sink 1&3 and source 3 goes to sink 1&2. Their passage of movement have been linked and they should travel on the processor before going to the sink.

Thank you for your help!

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.