| || |
Loop through table isn\'t working
I have a program that creates a .txt file, the script reads the .txt file row by row and prints the results. I am having trouble with the following situation.
if (ddt_val(FileName,"Element")=="abc" &&
I need to advance to a different row in the file to verify the data in a different element. If this new row data equals a certain value, I print "PASS" to the report, if not, I print "FAIL". The "PASS" and "FAIL" have to reference the element and data from the original row that I'm checking not from the second row that's checked.
I used the ddt_next_row while != certain_element to advance to the row I needed, but I can't get back to the original row to print the information in the report.
Re: Loop through table isn\'t working
I'm not sure I'm following you exactly, but if I'm close, then I think you want to use ddt_get_current_row(dataTable, rowNum), loop through the rows to find your other row that determines pass/fail for the first, then use ddt_set_row(dataTable, rowNum) to get back to the original row so that you can set the pass/fail element.
[i]...Sound trumpets! Every trumpet in the host! / Sixty thousand, on these words, sound, so high the mountains sound, and the valleys resound.</i] (The Song of Roland)