question

Tamilselvan avatar image
0 Likes"
Tamilselvan asked Tamilselvan commented

Tracked variable in Global table

I am trying to access the global table tracked variable in wait for event activity. if its meets the condition it should pass. i am using the tracked variable in global table and using Model.find("Tools/GlobalTables/GlobalTable1>variables/data/Row 2/Col 2") this statement for refering but not working

FlexSim 23.1.4
tracked variables
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

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

it works in this example!

evaluate_table_cell_tracked_variable.fsm


· 6
5 |100000

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

Tamilselvan avatar image Tamilselvan commented ·

i am using Model.find to set the table, row and column dynamic.

for example

Model.find("Tools/GlobalTables/"+token.item.Table+">variables/data/"+token.item.Row+"/"+token.item.Col) in this case its not working

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Tamilselvan commented ·

@Tamilselvan

you must convert a number into a string!

here is a source code example for the Object field, where a token.myCellVal has got a value of 2.

Object current = param(1);
treenode activity = param(2);
Token token = param(3);
treenode processFlow = ownerobject(activity);
string eventString = "Tools/GlobalTables/GlobalTable1>variables/data/Row ";
eventString +=string.fromNum(token.myCellVal);
eventString +="/"+string.fromNum(token.myCellVal);
return /**/Model.find(eventString)/**direct*/;

A string path by rank numbers works, too:

"Tools/GlobalTables/GlobalTable1>variables/data/2/2"

You must replace variable elements by strings.

0 Likes 0 ·
Tamilselvan avatar image Tamilselvan Joerg Vogel commented ·

Thanks @Joerg Vogel , it works well for num value. only thing is my column name will be in string. is there is way to find the column number based on the column value i provide

0 Likes 0 ·
Show more comments