06-27-2012 02:27 PM
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!!
06-27-2012 02:29 PM
post your VI
06-27-2012 02:59 PM
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!!
06-27-2012 03:01 PM
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.
06-27-2012 04:44 PM
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?