Avatar

Level 10

My bad!

I have forgotten to use the .length property of the resolveNodes nRows in the for statement. See below:

var aWords = []; // create an array variable

var nRows = xfa.resolveNodes("Table1.Row2[*].Cell1"); // resolve all of the repeating instances

// Loop through the rows

for (var i=0; i<nRows.length; i++) {

          aWords.push(nRows.item(i).rawValue);

}

aWords.sort(); // Sort the array

this.rawValue = aWords.join(", ");

https://acrobat.com/#d=qJSC7nD*bJGU0RJyn9qgvA

Niall