question

Roi Sánchez avatar image
0 Likes"
Roi Sánchez asked Roi Sánchez answered

Problem when updating calculated table

Hi all,

I am trying to use a calculated table to show real time stats in a bar graph. The calculated table is working fine if I manually update it when modifying the query to a global table. I realised I have to modify this query by inserting or deleting a blank space in the Query field and then pressing Update and only by doing this while running the model, the bar graph shows the data in the calculated table.

I want to update the calculated table on Model Start by using code and this is working only if I modify the query before (adding or deleting a blank space) updating it (while running the model, which is not a right solution). Is this a bug? I am working with the latest FlexSim version 18.1.

This is the code I am using to update them:

treenode table1 = model().find("Tools/CalculatedTables/CalcTable_SaturacionOperarios");
function_s(table1, "update", 1);

If this is a bug, I think I could solve it if there was a way to modify the query in the Calculated table field by using code.

FlexSim 18.1.0
querystatscalculated table update
· 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.

Roi Sánchez avatar image Roi Sánchez commented ·

Here it is a dummie example of the problem I am getting.

dummieexample-calculatedtableproblem.fsm

Thanks all.

0 Likes 0 ·
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Joerg Vogel edited

The calculated table view is updated by this code:

Object table1 = model().find("Tools/CalculatedTables/CalculatedTable1");
function_s(table1, "update",1);

You must set the Update Mode in the calculated table properties to "Manual"

5 |100000

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

Roi Sánchez avatar image
0 Likes"
Roi Sánchez answered

Thank you @Jörg Vogel, now it is working.

5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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