question

HUNGKUAN W avatar image
0 Likes"
HUNGKUAN W asked chukiat commented

How to get the number of item in the list

As title , I tried using a variable as a condition , and the variable represents the number in the list (plus 1 when pushing, minus 1 when pulling ) , but sometimes it will be negative and isn't allowed in my model's logic .
is there anyway to directly get the number in the content?

FlexSim 18.1.1
list entries
2018-07-16.png (79.0 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.

Joshua S avatar image
0 Likes"
Joshua S answered

You can use

List("ItemList1").stats.content.value
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
0 Likes"
chukiat answered chukiat commented

Hello @Joshua S @HUNGKUAN W

I have same problem with you and I try to use your commend

But I can't do as attached picture

Can you suggest more


1689922002080.png


1689922002080.png (95.2 KiB)
· 2
5 |100000

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

Felix Möhlmann avatar image Felix Möhlmann commented ·
The List("ListName") syntax is used to access a global list. If your list is internal to the Process Flow you can instead try to get the number of tokens inside the activity.
getstat(getactivity(processFlow, "List"), "Content", STAT_CURRENT, processFlow)
(This uses the parameter processFlow, so it will only work when used in a Process Flow activity. If you are using an Object Process Flow, replace the last parameter with instance.)
1 Like 1 ·
chukiat avatar image chukiat Felix Möhlmann commented ·
Hi Felix

It work well

Thank you very much

0 Likes 0 ·