question

Patrick Zweekhorst avatar image
0 Likes"
Patrick Zweekhorst asked Patrick Zweekhorst commented

How to link combobox to global variable?

Hi,

Is it possible to link a combobox in a dashboard to a global variable?
When I only link the combobox to the variable it does not work.
Can I make this work, or do I need to add an extra node in the tree where I will link the combobox to.
The combobox will be the only place where the global variable is changed.

Thank you in advance,

Patrick

(A small example model: combotest.fsm )

FlexSim 19.0.0
global variablescombobox
combotest.fsm (16.4 KiB)
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

·
Phil BoBo avatar image
0 Likes"
Phil BoBo answered Patrick Zweekhorst commented

If you just want to be able to set the value, you could put code in the OnSelect of the combo box to set the global variable.

If you want to be able to set the value and get the value (have the combo box show the right option when you open the dashboard or change the global variable's value), then you need to be able to hotlink the control to the global variable's value. You can do this using a regular combo box widget and then using a GUI Class widget in the dashboard to reference that combo box.

See the attached model: 16898-combotest-1.fsm


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

Patrick Zweekhorst avatar image Patrick Zweekhorst commented ·

Hi @phil.bobo,

This is what I wanted, thanks for the solution.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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