{"record":{"id":"813bb2003c19c28e","repo":"pentaho/pentaho-kettle","slug":"accessinput-exception-couldnotfindfield","errorCode":"AccessInput.Exception.CouldnotFindField","errorMessage":"AccessInput.Exception.CouldnotFindField","messagePattern":"AccessInput\\.Exception\\.CouldnotFindField","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/ms-access/impl/src/main/java/org/pentaho/di/trans/steps/accessinput/AccessInput.java","lineNumber":277,"sourceCode":"            ValueMetaInterface valueMeta = data.convertRowMeta.getValueMeta( i );\n            data.convertRowMeta.setValueMeta( i, ValueMetaFactory.cloneValueMeta(\n              valueMeta, ValueMetaInterface.TYPE_STRING ) );\n          }\n\n          // Check is filename field is provided\n          if ( Utils.isEmpty( meta.getDynamicFilenameField() ) ) {\n            logError( BaseMessages.getString( PKG, \"AccessInput.Log.NoField\" ) );\n            throw new KettleException( BaseMessages.getString( PKG, \"AccessInput.Log.NoField\" ) );\n          }\n\n          // cache the position of the field\n          if ( data.indexOfFilenameField < 0 ) {\n            data.indexOfFilenameField = getInputRowMeta().indexOfValue( meta.getDynamicFilenameField() );\n            if ( data.indexOfFilenameField < 0 ) {\n              // The field is unreachable !\n              logError( BaseMessages.getString( PKG, \"AccessInput.Log.ErrorFindingField\" )\n                + \"[\" + meta.getDynamicFilenameField() + \"]\" );\n              throw new KettleException( BaseMessages.getString(\n                PKG, \"AccessInput.Exception.CouldnotFindField\", meta.getDynamicFilenameField() ) );\n            }\n          }\n\n        } // End if first\n\n        String filename = getInputRowMeta().getString( data.readrow, data.indexOfFilenameField );\n        if ( log.isDetailed() ) {\n          logDetailed( BaseMessages.getString( PKG, \"AccessInput.Log.FilenameInStream\", meta\n            .getDynamicFilenameField(), filename ) );\n        }\n\n        data.file = KettleVFS.getInstance( getTransMeta().getBowl() ).getFileObject( filename, getTransMeta() );\n        // Check if file exists!\n      }\n      // Add additional fields?\n      if ( meta.getShortFileNameField() != null && meta.getShortFileNameField().length() > 0 ) {\n        data.shortFilename = data.file.getName().getBaseName();","sourceCodeStart":259,"sourceCodeEnd":295,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/ms-access/impl/src/main/java/org/pentaho/di/trans/steps/accessinput/AccessInput.java#L259-L295","documentation":"KettleException thrown in AccessInput.openNextFile when the configured dynamic filename field does not exist in the incoming row stream. indexOfValue returned -1, meaning the field name set in the dialog matches no field produced by the previous step.","triggerScenarios":"getInputRowMeta().indexOfValue(meta.getDynamicFilenameField()) < 0: the filename field name configured in the Access Input step is misspelled, or the upstream step was changed/renamed/removed so the field no longer exists in the row layout.","commonSituations":"Renaming an upstream Select Values / Text File Input field without updating Access Input; the previous step outputs the path under a different name than configured; transformations edited by hand where the field name string drifted.","solutions":["Open the Access Input step dialog and re-select the correct filename field from the available fields.","Check the upstream step's output fields (preview rows) and confirm the field name matches exactly, including case.","Add or fix the upstream step so it emits the filename field before the Access Input step."],"exampleFix":"// before: Filename field = \"Filename\"  (upstream emits \"filename\")\n// after:  Filename field = \"filename\"\nmeta.setDynamicFilenameField( \"filename\" );","handlingStrategy":"validation","validationCode":"// verify the configured field exists in the incoming row layout\nint idx = inputRowMeta.indexOfValue( meta.getDynamicFilenameField() );\nif ( idx < 0 ) {\n  throw new IllegalArgumentException( \"Field '\"\n    + meta.getDynamicFilenameField() + \"' not found in input row: \"\n    + Arrays.toString( inputRowMeta.getFieldNames() ) );\n}","typeGuard":null,"tryCatchPattern":"try { /* run transformation */ } catch ( KettleException e ) { if ( e.getMessage().contains( meta.getDynamicFilenameField() ) ) { logError( \"Re-select the filename field in the Access Input step\" ); } }","preventionTips":["Use row-preview to diff upstream field names against step config","Avoid renaming fields without a downstream impact scan","Keep field names lowercase-consistent across steps"],"tags":["kettle","ms-access","field-mapping","configuration","step"],"backgroundTag":"record-not-found","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}