Write to Global Table when the conditions match

__ANON_USER__1
Not applicable
0 Views
2 Replies
Message 1 of 3

Write to Global Table when the conditions match

__ANON_USER__1
Not applicable

[ FlexSim 19.0.5 ]

Is there a way to write to GlobalTable only when the conditions are met?

In this model,
Write all item numbers in the first line.
Write the Urgent=1 item number on the second line.


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

joerg_vogel
Not applicable
Accepted solution

If the label values stay static while you develop your model, then I would set the table row depending on the label Urgent.

Table(“GlobalTable1“)[item.Urgent+1][“Number”] = item.ItemNumber;

Instead of the column header name “Number” you can set simple the column number 1, too.

0 Likes
Message 3 of 3

joerg_vogel
Not applicable

anonymous user, as you see, you needn’t any condition.

  1. clear all values
  2. write in first row all numbers as you have done it.
  3. use my code. If Urgent isn’t 1 then this code will only overwrite the first row with the same value.
0 Likes