question

Paul M3 avatar image
0 Likes"
Paul M3 asked Joerg Vogel answered

On entry trigger if-condition write to global table

Hello everybody,

I would like to make an if-condition with a trigger at flexsim but I have no idea about coding. Could you please help me?

I have a label named "Number" on every item. I would like to have a code that works like the following logic:

On entry if the value of the label of the item = 150 write "2" to global table, if not, do nothing.

Thanks in advance!

FlexSim 18.1.2
codetriggerevent triggerif
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
2 Likes"
Joerg Vogel answered
if(item.Number == 150) 
Table("yourGlobalTableName").cell(num of row, num of column).value = 2;

or

if(item.Number == 150) 
Table("yourGlobalTableName")[num of row][num of column] = 2;
5 |100000

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