07-01-2020 10:03 AM
Ok, I've been fighting this for a few hours now, and can't wrap my head around how to do it. Basically, I want to take 1 array that has "test names" in columns and each row lists all possible values for that test. I want to turn that array into another array listing every single combination of those test results (so i can feed it into my program to do some handling testing... but that is aside from this). The original array has (currently) 27 columns - which could expand; and each test has anywhere from 2 to 5 possible results.
basically, I'm trying to turn the first table in this screenshot into the second one. I'm sorry if this is already posted somewhere, but all I could find was info on truth tables and other table manipulation that wasn't quite so expansive - which is where I'm getting stuck. Thank you in advance. I know this is probably way simpler than I'm making it, lol
Solved! Go to Solution.
07-01-2020 10:14 AM
Nested For Loops.
07-01-2020 10:59 AM
yeah... I know that's the path I need to go down... I just can't quite get it to do what i want...
07-01-2020 11:59 AM
I'm attaching what I have so far.... I just can't quite get it...
07-01-2020 12:28 PM
Like this.
No unnecessary array manipulation.
07-01-2020 12:36 PM
Is there a way to do this without having a for loop for each column? My data currently has 27 columns.... but the next time, it might be 10, or 50? is there a way to do it without having to manipulate the .vi for each scenario? (that's where I'm getting stuck)
07-01-2020 12:46 PM
Sure. But now you are expanding the problem. And it will be exponential.
Let me think about it.
Think about it as a numerical problem. Suppose it was a 27 digit number?
07-01-2020 12:53 PM
Could you save for '17 version or post screenshots of what you have?
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
07-01-2020 12:58 PM
Here you go
07-01-2020 01:04 PM
yes, I know.... it is a mess! This problem comes up for me quite often... I usually use excel to copy and paste everything in there, but with 27 different attributes each with 3-5 different possible values.... i just thought there would be an easier way to do it programmatically... but i think I've spent more time on this than I would have if I had just copied/pasted the data, lol. It's just it comes up so often, and it is never the same number of attributes/possibilities....