LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

exclusive selection from multiple lists

I have 4 separate but related lists. each list initally has 8 options, from D1 to D8.

The user can select any option from the first list, but depending on his selection, he will only be able to select limited items from the next lists.

for example, selecting D1 from list 1, you can only select D2 - D8 on the other three lists.

then the user selects D3 from list 2, so now he should only be able to select: D2,D4, D5, D6, D7,D8 from list 3 and 4.

Then he selects D4 from list 3, so now he should only be able to seelct  D2,D5,D6,D7,D8 from list 4.

so basically each option selected will eliminate that option from future lists.

 

I have partially working code, but it only updates the first 2 lists. The selection in list1 reappears in list 3, when it really shouldn't.

 

any ideas would be a greeaaaaaaaaaaat help!!

 

 

0 Kudos
Message 1 of 5
(2,214 Views)

post your VI

 

0 Kudos
Message 2 of 5
(2,213 Views)

I attached what I have done so far.

I am thinking of changing the second array (have a note there) to be an array from D1 to D8 without the  first selection though.That way it will only compare it to "valid" options.

I tried "delete from array" function but I don't know how to delete a particular string from an array, as I don't know the index.

 

Thanks!!

0 Kudos
Message 3 of 5
(2,210 Views)

Attach the code, not a picture of it. Also, take some time to learn what dataflow programming is about and ditch the use of sequence frames.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 4 of 5
(2,206 Views)

Of course the option from the first list appears in the third one - nothing in your code removes it!  You have two copies of the array constant that are in no way linked, so the second frame operates on the same list as the first.

 

A much simpler way to code this would be to start with the list of all the options.  For each selection, use the "Search 1D Array" to find it in the list and use "Delete From Array" to remove it, then pass the remaining array (without the deleted element) as the array for the next list.  You should start from only a single array constant.

 

There are likely a bunch more problems with your code, for example, what if the user selects from the list in the wrong order?

0 Kudos
Message 5 of 5
(2,184 Views)