question

Luis Fernando avatar image
0 Likes"
Luis Fernando asked Jeanette F commented

How to set a conditional decide if a label is = to a value in a global table

Hi FlexSim team,


I would like to set a conditional decide in the case that the label value match with the value of a global table depending on the "model" label.

I place this in the conditional decide:
token.Pieza.TimesProcessed == Table("GlobalTable3").getValueByKey(token.Model,"TimesProcessed",1)

Could you tell me where is the mistake?

1669933699207.png


Thank you,

Luis


1.1 Conditional decide by (depending) model label.fsm

FlexSim 22.2.3
conditional decidematch labelgetvaluebykey
· 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.

1 Answer

Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Luis Fernando commented

Table.getValueByKey() is meant to find a value in a column, not a row header. In your case, you can just use:

  1. token.Pieza.TimesProcessed == Table("GlobalTable3")["F"][1]
· 5
5 |100000

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