LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a dop-down list from an array

Does anybody have an idea on how I would create a control that takes the form of a drop-down list (like an enum type) whereby the options in the dropdown list vary according the entries in a database?

i.e. If I have an array of names, I would like the drop-down list to contain all the names in the array dynamically and be updated as the array is changed in the program.

Thanks.

Ken
0 Kudos
Message 1 of 4
(2,921 Views)

Have you tried using a combo box? These provide drop down menus, but the text can be changed. You can make  the text displayed be the control's value, or assign other values.

 

P.M.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 4
(2,912 Views)
Enums, dialog rings, have a property called Strings[ ]. This is an array that contains the strings that you can select in the control. If you know how to read the database already, right click on the control and select Create Property. Right click on the property node and select Change to Write. Wire the result from the database read to the property node. A ring control also has the additional property called StingsAndValues[ ] if you want to assign a different numeric value to the string item.
0 Kudos
Message 3 of 4
(2,910 Views)
That's great. Thanks for the help and the quick reply.

Ken
0 Kudos
Message 4 of 4
(2,905 Views)