question

Jingyong P avatar image
0 Likes"
Jingyong P asked mfrsagfm commented

How to get a list's content quantity?

Control List Content.fsmI want to use "Decide" to check a list's content quantity.

when list has 5 or more content, I want to redirect newly arrived tokens to sink till content qty < 5

I tried, but not working.

  1. List("List1").stats.content.value <= 5
FlexSim 21.0.0
flexsim 21.0.0list content
· 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.

David Seo avatar image
0 Likes"
David Seo answered Jingyong P commented

@Jingyong P

You can solve your issue using (List("List1").stats.input.value - List("List1").stats.output.value) < 5 condition. And you should set List1 to global not local.

I attach the model fixed.

control-list-content_FKor.fsm

If you have a question about the model, let me know it.


· 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.

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered mfrsagfm commented

If you want to count the entries of a list, then you get this by

  1. List(“List1”).entries().length

if you want to get the sum of field values, then this is a table query over a list with SUM clause.


· 5
5 |100000

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