LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Populate combo box dynamically

Solved!
Go to solution

I have a combo box which is populated from a cluster array which is unbundled to the element I want to populate the combo box with. There is multiple types with the same element such as 

1 - 60mm

1 - 60mm

1 - 60mm

1 - 60mm

3 - 60mm

3 - 60mm

 

 

What I want to do is just show one 1 - 60mm and one 3 - 60mm and when selected will get the index value to be displayed with thos types only in a table?

 

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 1 of 16
(4,351 Views)

You mean you want to remove the duplicate elements?

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 16
(4,341 Views)

Yes I want to remove the duplicates and when that element is selected it will load all matching elements

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 3 of 16
(4,338 Views)

@PauldePaor wrote:

Yes I want to remove the duplicates and when that element is selected it will load all matching elements


What is the output that you are expecting? the index of the matching values? number of matching values?

0 Kudos
Message 4 of 16
(4,325 Views)

The output is being displayed in a table and I would like just to display all matching elements in the table

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 5 of 16
(4,323 Views)

I am not limited to a combo box any other form of control like a combo box will also suffice 

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 6 of 16
(4,301 Views)

You can go for a Ring control. Still not able to understand "matching elements". Do you mean that other elements in the cluster along with "Type"?

-----

The best solution is the one you find it by yourself
0 Kudos
Message 7 of 16
(4,291 Views)

My cluster has multiple elements with an ID Type Time Date Stamp and various other paramenters. Some elements have the same type for instance

ID  Type          Time Date

1   1-60mm   13:00 18/06/2014

 

ID  Type          Time Date

2   1-60mm   13:00 18/06/2014

 

ID  Type          Time Date

3   3-50mm   13:00 18/06/2014

 

I would like the combo box or ring control to display just one 1-60mm(no duplicates) and when pressed it will load every other element with type

1-60mm in my table

 

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 8 of 16
(4,285 Views)

Here's how I would do that: (second case is 0, Default and it's just stright wire connecting shiftregisters)

Message 9 of 16
(4,274 Views)
Solution
Accepted by topic author PauldePaor

I just made a sample code to show one of the way to achieve what you want (To be honest, I did to refresh my coding skill). You can tweek to get it to a good shape.

 

Excercise.png 

-----

The best solution is the one you find it by yourself
Message 10 of 16
(4,265 Views)