Count the number content in GlobleTable's value

Count the number content in GlobleTable's value

s1125413
Enthusiast Enthusiast
144 Views
2 Replies
Message 1 of 3

Count the number content in GlobleTable's value

s1125413
Enthusiast
Enthusiast

Hello FlexSim community and dear @moehlmann_fe!

 

Is there any method to count the number of contents in the values of a Global Table?

 

In my big model, I intend to customize the connectors between processors, as the relationships will change. To address this, I have stored the original information in the Global Table and plan to build the connectors between objects based on the data in the Global Table.

 

Thank you in advance for your help and advise.

 

s1125413_0-1758511960685.png

 

 

0 Likes
Accepted solutions (1)
145 Views
2 Replies
Replies (2)
Message 2 of 3

moehlmann_fe
Enthusiast
Enthusiast
Accepted solution

My preferred solution would be to write an array (probably containing object pointers) to the table in the first place. Then you'd have direct access to the number of elements.

If you want to keep the value as a string, you can use either the "match" or "split" methods to subdivide the string into its components and thus get their count.

https://docs.flexsim.com/en/25.2/Reference/CodingInFlexSim/FlexScriptAPIReference/Basic/string.html#...

https://docs.flexsim.com/en/25.2/Reference/CodingInFlexSim/FlexScriptAPIReference/Basic/string.html#...

Message 3 of 3

s1125413
Enthusiast
Enthusiast

@moehlmann_fe Thank you, It's functionally!

0 Likes