question

Chia-Lu T avatar image
0 Likes"
Chia-Lu T asked Matthew Gillespie edited

Write boolean value to global table

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?

write to global table
5 |100000

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

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered

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;
5 |100000

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

Joshua S avatar image
0 Likes"
Joshua S answered Matthew Gillespie edited

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.

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

pic1.png (8.9 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.