question

G C avatar image
0 Likes"
G C asked Jacob Gillespie edited

pull activity parameter

What is the equivalent of the "collected" parameter for a pull from list activity? I want to set a label equal to the number of items pulled from a list.

FlexSim 17.2.1
pull from listmax wait timer
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

·
Jacob Gillespie avatar image
1 Like"
Jacob Gillespie answered Jacob Gillespie edited

If you pull more than one item from a list then it stores it as an array. So you can use:

token.Pulled.length

EDIT

If you are using a max wait timer then you could pull nothing at all. To handle this then you could use the following code in your set labels activity:

if(token.Pulled? || token.Pulled? == NULL)
	return token.Pulled.length;
else
	return 0;

Or in one line:

token.Pulled? || token.Pulled? == NULL ? token.Pulled.length : 0
5 |100000

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

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.