question

chukiat avatar image
0 Likes"
chukiat asked chukiat commented

Can't get value from list that have been push from 2D token (not 3D item)

Hi everyone

Normally, I make list by event-trigger of item flow in 3D and I can get value after pull by next command

But I have some require that I want to create token in 2D, then assign some label and push to list

After I pull it, I can't refer any value from pulled token

Please suggest me What is my mistake

Test module.fsm

1690344688244.png

FlexSim 23.1.1
push to list
1690344688244.png (85.0 KiB)
test-module.fsm (40.1 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.

Julie Weller avatar image Julie Weller commented ·

Hi @chukiat, was Jason Lightfoot'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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered chukiat commented

The pulled token is probably released and destroyed as soon as you pull it. Add a delay before it's destroyed, or add Refer to the SELECT part of the pull query.

· 3
5 |100000

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

chukiat avatar image chukiat commented ·
Hi, Jason

I have delay after Pull but still not working

It like my command pull only list but not get value that assign before Push to list

Do you have other way to solve it

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann chukiat commented ·

In your model the token that is pushed to the list continues immediately instead of waiting to be pulled, so the delay probably already finished when the pull occured, leading to the same outcome.

To guarantee that you can get the label value in this case you can do one of the following:

- As Jason mentioned, you a SELECT clause in the query, that will copy the list field to a label on the token before the pull actually happens.

1690355107107.png

- If you are not interested in the token reference but only the label value, you can also push the label value to the list. Then you don't have to worry about what happens to the token that pushed the value.

1690355195124.png

test-module_1.fsm

1 Like 1 ·
1690355107107.png (29.5 KiB)
1690355195124.png (10.5 KiB)
test-module-1.fsm (42.4 KiB)
chukiat avatar image chukiat Felix Möhlmann commented ·
Hi Jason/ Hi Felix

I just understand to use SELECT and get result as my expect

Thank you very much

0 Likes 0 ·