Write boolean value to global table

Write boolean value to global table

chia_lu_t
Not applicable
10 Views
2 Replies
Message 1 of 3

Write boolean value to global table

chia_lu_t
Not applicable

hi every one, I am a new user of FlexSim. In process flow, I want to compare two variables and depend on the conditions like greater or less and then to write boolean value (true or false)(1 or 0) to global table how should I do?

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

Matthew_Gillespie
Autodesk
Autodesk
Accepted solution

You can write to a global table using the Table API. After adding a global table in the toolbox you would use code like the following:

Table("GlobalTable1")[1][1] = variable1 > variable2 ? 1 : 0;


Matthew Gillespie
FlexSim Software Developer

0 Likes
Message 3 of 3

joshua_s
Not applicable

You can do this by using a custom code activity in process flow as shown in the picture below, or using the line of code below.

13188-pic1.png

Table("GlobalTable1")[row][column] = 1
0 Likes