DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Perform Search where one of 5 conditions is variable

I am working on a script for report generation that will create pareto charts based on the search result.

 

Right now I am doing the exact same search and display, except the part number (one of 8 conditions) changes each time.  So I have 8 copies of the same code, just the part number constraint is defined differently.

 

I am guessing that I could do this in a For loop and make the code much cleaner (and expandable for new part #s), but I cannot figure out how to make the For loop adjust the part # each iteration.

 

Normally you would count up or down until you reach a set value, but I am not sure how you change the for loop condition when the part #s are not sequential (or any pattern at all)

 

Thanks.

Kenny

0 Kudos
Message 1 of 2
(3,183 Views)

Hi Kenny,

 

I have done this many times and have code I'd be happy to share.  If you optimize the part number property, then you can query the DataFinder to give you an array of all the distinct part numbers, which you can then loop through.

 

I think it would be easiest to contact me via email at brad.turpin@ni.com,

Brad Turpin

DIAdem Product Support Engineer
National Instuments

0 Kudos
Message 2 of 2
(3,171 Views)