LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Updating combo box/ring in array of clusters

Solved!
Go to solution

Hello all

 

I'm currently trying to create an user interface, that can be filled out manually (and then  possibly exported) or imported from csv file.

The data is held in an array of clusters and the cluster holds all the different data types i need.

AeroSoul_0-1662555088240.png

 

The problem i'm having is that the "Analysis Protocol" should be a ring or combo box or similar, which updates it's selection when the program is ran, by reading values from database.

Thing is, i can't do this by reading and writing a cluster, that only updates the value that is shown and not the selection.

Is there a way to update this selection inside the cluster?

 

 

 

combo_test.png

0 Kudos
Message 1 of 12
(2,862 Views)

Hi AeroSoul,

 

if you put any new string which is not included in the Combo Box, the string will show, but the values for selecting won't change in Combo Box.

So if you just give the correct values, such as "TEST" in your example, it will show the correct value from your select list.

 

Can you specify more, which concern you have if the method you are doing not doesn't fulfill your requirement?

 

Regards,

FrankenChino

0 Kudos
Message 2 of 12
(2,853 Views)

What i want is to load a list of possible protocols from database and fill the combo box selection with that. The user would then be able to click on the combo box and select one of the available protocols.

 

What i can do at the moment is pre-fill the combo box with some values, that don't necessarily reflect what protocols the user will have available.

 

Hopefully i explained it better this time.

0 Kudos
Message 3 of 12
(2,849 Views)

Hi AeroSOul,

 

you can apply the Invoke Node of Combo Box to append new string during the process of the program.

 

Regards,

FrankenChino

 

FrankenChino_0-1662557269180.png

 

0 Kudos
Message 4 of 12
(2,847 Views)

The combo box is part of a cluster, which is part of array. I couldn't find an invoke or property node that would allow me to update combo box that way. I know how to update combo box in itself (i usually use property node --> strings and values), just not inside a cluster inside an array.

0 Kudos
Message 5 of 12
(2,841 Views)
Solution
Accepted by topic author AeroSoul

Hi AeroSoul,

 

here is the solution,

Accessing Properties and Methods of Array or a Cluster Elements

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YH1ACAW&l=de-DE

 

Regards,

FrankenChino

Message 6 of 12
(2,825 Views)
Solution
Accepted by topic author AeroSoul

If you want to create a reference or a property/invoke node of an element that is visible on your front panel, you can just right-click on that control and select create / property node / strings[]

This way you get a property node inside a cluster inside an array. Keep in mind that the "strings[]" - list is a property of that control and is shared with all controls in that array

Greets, Dave
Message 7 of 12
(2,818 Views)

I made an example. If you double-click on the property node, LabVIEW highlights the right control.

 

Combo Box inside Cluster inside Array.png

Greets, Dave
0 Kudos
Message 8 of 12
(2,816 Views)

Edit: I would suggest to take Dave's solution. The references are more recommanded when multiply VIs are interacted.

 

Hi AeroSoul,

 

if you insist to do it in Cluster in Array, then here is the final solution.

 

I think you might be struggling with that, here is the solution due to your project.

 

Step by Step:

 

FrankenChino_0-1662559916080.png

 

Regards,

FrankenChino

 

0 Kudos
Message 9 of 12
(2,805 Views)

@daveTW wrote:

If you want to create a reference or a property/invoke node of an element that is visible on your front panel, you can just right-click on that control and select create / property node / strings[]


Well, that was easy...

 

Thank you both for your help.

 

One question about the reference solution, i obtained reference to array, then to cluster, but i could not obtain a working reference to the combo box. What am i doing wrong?

 

AeroSoul_0-1662621028889.png

Obtaining a reference directly to combobox without first getting cluster reference didn't work either.

0 Kudos
Message 10 of 12
(2,760 Views)