LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get data from a 2D array following the elements selected in a menu ring

Solved!
Go to solution

Correct me if i am wrong but that doesn't account for if the data from the listbox is in the same order... i.e. listbox item 2 in column 2 >> data may actually be in column 3..

 

Could be having a brain fart here but..

0 Kudos
Message 21 of 30
(828 Views)

yes... well just get the array of items you've selected and loop your search!!!????

 

 

0 Kudos
Message 22 of 30
(828 Views)

In fact, when I did the solution suggested, it doesn't give me the right columns, when index the listbox

This is my list box :

Capture.PNG

If i select order 1, and it's number 2 in the list box i  obtain column number 2, which isn't for order 1 datas

If i select Order 24 , number 15 in the listbox, it gives me column number 15, however concretely Order 24 exists in column 4 .....

 

 

 

0 Kudos
Message 23 of 30
(828 Views)

This is what i just did; I convert the listbox to a string array and index it, within a for loop, and I index the 2D array , use " search in 1D array" the elemnts of the listbox but It doesn't work, i get a 1D of (-1), it means it doesn't find the elements, so i used a case structure to have only >0 indexs but it doesn't work either even though I have done many trials 

0 Kudos
Message 24 of 30
(821 Views)

Sorry for misunderstanding then 😉

Might not be the best way to do it, but a quick idea here :

 

samehA.png

 

 

CLAMaxime -- Kudos are a great way to say thank you
Message 25 of 30
(819 Views)

Thank you so much Smiley Happy That works well to extract the columns related to the selected orders, 

Still how to obtain the indexs of these columns in reference to the initial array.

 

0 Kudos
Message 26 of 30
(811 Views)

Hi,

added index.

bharath_p
LV2020
0 Kudos
Message 27 of 30
(808 Views)

Output theloop counter (integer) the same way as I did for the text array.

CLAMaxime -- Kudos are a great way to say thank you
0 Kudos
Message 28 of 30
(807 Views)
Solution
Accepted by Student_LV

you can use multicolumn listbox or table and get the index as well as data using point to row method, instead of searching.

edit:

modified VI

bharath_p
LV2020
0 Kudos
Message 29 of 30
(799 Views)

Hi!

Thank you so much for your help, 

 I made some other changes and finally it respond perfectly to what i want to doSmiley Happy

0 Kudos
Message 30 of 30
(779 Views)