I have a xml file that I am looping on a particular node to extract data. I need to reference that value of the extraction and search a ODBC connection csv file for another value. My connection works and I am able to pull data in but not in the way I am looking for. As soon as I put the ODBC connection and extraction into the repeat steps, everything breaks and I am getting an error “Cannot read property fields from undefined”.
var connectionURL = “jdbc:odbc:TrainingChecklist”;
//var Description = record.tables.EDP[1].fields.Description;
var Description = record.tables.EDP[steps.currentLoopCounter].fields.Description;
if(Description){
var csvConnection = db.connect(connectionURL,"","");
var csvQuery = “SELECT * FROM “psocodes.csv” WHERE Description=” + “’” + Description + “’”;
logger.info(csvQuery);
resultSet = csvConnection.createStatement().executeQuery(csvQuery);
logger.info(resultSet);
resultSet.next();
}