question

Sinisa avatar image
0 Likes"
Sinisa asked Jacob Gillespie answered

Global Table -> Integer Output

Hey guys i want to output an calculated value , as an integer in a new cell ?

Is this possible in Flexscript ?

Thanks in advance !

FlexSim 17.1.2
global tableoutputinteger
integer.png (15.4 KiB)
5 |100000

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

Jacob Gillespie avatar image
3 Likes"
Jacob Gillespie answered

Use trunc()

Table table = Table("GlobalTable1");
table[2][1] = trunc(table[1][1] / table[1][2]);

Or you can do as Raja suggested and store the calculated value to an int. This also truncates the number.

Table table = Table("GlobalTable1");
int value = table[1][1] / table[1][2];
table[2][1] = value;
5 |100000

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

Raja Sekaran avatar image
3 Likes"
Raja Sekaran answered

Hi,

first store the calculated value to an int variable then assign that value to a table cell.capture.png


capture.png (14.0 KiB)
5 |100000

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