question

anon-user avatar image
0 Likes"
anon-user asked Joerg Vogel commented

Write to Global Table when the conditions match

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.


FlexSim 19.0.5
global tabletriggersconditionflexsim 19.0.5met
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
0 Likes"
Joerg Vogel answered Joerg Vogel commented

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.

· 1
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·

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 0 ·