{"record":{"id":"11ef7bba2b31f704","repo":"pentaho/pentaho-kettle","slug":"you-must-select-at-least-on-field","errorCode":null,"errorMessage":"You must select at least on field!","messagePattern":"You must select at least on field!","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/setvalueconstant/SetValueConstant.java","lineNumber":113,"sourceCode":"            logError( BaseMessages.getString( PKG, \"SetValueConstant.Log.CanNotFindField\", meta.getField( i ).getFieldName() ) );\n            throw new KettleException( BaseMessages.getString( PKG, \"SetValueConstant.Log.CanNotFindField\", meta\n              .getField( i ).getFieldName() ) );\n          }\n\n          if ( meta.getField( i ).isEmptyString() ) {\n            // Just set empty string\n            data.getRealReplaceByValues()[i] = StringUtil.EMPTY_STRING;\n          } else {\n            // set specified value\n            if ( meta.isUseVars() ) {\n              data.getRealReplaceByValues()[i] = environmentSubstitute( meta.getField( i ).getReplaceValue() );\n            } else {\n              data.getRealReplaceByValues()[i] = meta.getField( i ).getReplaceValue();\n            }\n          }\n        }\n      } else {\n        throw new KettleException( BaseMessages.getString( PKG, \"SetValueConstant.Log.SelectFieldsEmpty\" ) );\n      }\n\n      data.setFieldnr( data.getFieldnrs().length );\n\n    } // end if first\n\n    try {\n      updateField( r );\n      putRow( data.getOutputRowMeta(), r ); // copy row to output rowset(s);\n    } catch ( Exception e ) {\n      if ( getStepMeta().isDoingErrorHandling() ) {\n        // Simply add this row to the error row\n        putError( data.getOutputRowMeta(), r, 1, e.toString(), null, \"SVC001\" );\n      } else {\n        logError( BaseMessages.getString( PKG, \"SetValueConstant.Log.ErrorInStep\", e.getMessage() ) );\n        setErrors( 1 );\n        stopAll();\n        setOutputDone(); // signal end to receiver(s)","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/setvalueconstant/SetValueConstant.java#L95-L131","documentation":"SetValueConstant.processRow() throws KettleException 'SetValueConstant.Log.SelectFieldsEmpty' when the step is configured with an empty fields list. With no fields to replace, the step considers its configuration invalid and aborts instead of silently passing rows.","triggerScenarios":"First row processing when the step's field list (meta.getFields()) is null or size 0 — no rows were entered in the Fields tab of the dialog.","commonSituations":"Step added to the transformation but never configured; fields grid accidentally cleared; transformation XML/repo load lost the fields due to an earlier read error.","solutions":["Open the step dialog and add at least one field with its replacement value","If fields should exist, verify the transformation loaded correctly (check for earlier read errors)","Re-save the transformation after editing and re-run","If a no-op pass-through is intended, remove the step entirely"],"exampleFix":"// before\n<fields></fields>\n// after\n<fields><field><field_name>status</field_name><replace_value>ACTIVE</replace_value></field></fields>","handlingStrategy":"validation","validationCode":"if (meta.getField() == null || meta.getField().isEmpty())\n  throw new IllegalStateException(\"Set Value Constant step has no fields configured\");","typeGuard":null,"tryCatchPattern":"try { step.processRow(); } catch (KettleException e) { if (e.getMessage().contains(\"at least on field\")) { /* configure fields */ } else throw e; }","preventionTips":["Never leave the Fields tab empty; configure fields when adding the step","Add transformation-level checks (check() warnings) before runs","Validate loaded transformations for empty step configs","Remove steps that are intentionally no-ops"],"tags":["kettle","empty-config","configuration"],"backgroundTag":"missing-required-config-field","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"}