question

berkowicz-k avatar image
0 Likes"
berkowicz-k asked Felix Möhlmann answered

Choose Global Table Lookup by Parameter

Hello,

I would like to use a staff resource where the staff is selected by global lookup table and the table used for lookup is attached to a parameter. For example if parameter1 is set to 1 then "Table1" is used and if parameter1 is 2 then "Table2" is used for staff lookup. How can this be done?

Any help is appreciated,

Thanks

FlexSim 21.0.10
global tableprocesss flowresourcestaff
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

Felix Möhlmann avatar image
2 Likes"
Felix Möhlmann answered

If the table names are the same except for the numbering you can just put something like the following in to the table name field.

  1. "Table" + string.fromNum(Model.parameters.StaffTable)

If the names differ more, I would suggest to edit the code directly and use a switch statement with the parameter value as the case value.

table-lookup-by-parameter.fsm


5 |100000

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