question

jacopo-r avatar image
0 Likes"
jacopo-r asked Joerg Vogel answered

Accessing a Global list as Table

Hello,

I need to access a global list as it was a table and then query it.

Is this possible? Can anyone help me please?

Thanks!

FlexSim 24.0.1
global list
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·
A global list contains data as a treenode structure. Try to access it like a table. Maybe you have to select all and clone it into a new global table to get all dynamic values as static snapshots.
0 Likes 0 ·
jacopo-r avatar image jacopo-r Joerg Vogel commented ·

Hi @Joerg Vogel,

thank you for your comment. I think I tried what you said without success.

I uploaded an example of what I am trying to do in case you wanted to take a look at that and enlighten me a bit more. Thanks!


List_as_Table_TEST.fsm

0 Likes 0 ·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

As I commented you can access the content of a list through its tree structure.

please analyze this answer. A table query can you do over a treenode structure.

You can also try to watch a subtree as a table in a treeview by right mouse button context menu selection.

5 |100000

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

Lars Jacobsen avatar image
0 Likes"
Lars Jacobsen answered jacopo-r commented

Please include an example to explain why you need to first convert the list to a table and then query it, as you can query the list directly using SQL

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

jacopo-r avatar image jacopo-r commented ·
Hi @Lars Jacobsen,

please find the example model attached in a comment above.

I have found a work around treating the list as a list and pulling the reference of what I need. However, the partition got on the way. My idea is to have the list as a table and query it so I can have a queried table with only Type=2 (for example), regardless of the partition. The final aim is actually to count the number of rows of the queried table.

Probably there are others and smarter ways of ding this, but this is what I thought.

Please share any additional comments :)

0 Likes 0 ·