You will need to provide specifics about the field names their values, and what value you want placed in the target field for the value placed in the input field.
ok, to be specific I have a line field (LineRow1) which should have the value 001 if the description field has anything entered (SourceDescriptionRow1)
Use this code as the custom calculation script of LineRow1:
event.value = (this.getField("SourceDescriptionRow1").valueAsString=="") ? "" : "001";
// onBlur action for the "SourceDescriptionRow1" field:
this.getField("LineRow1").value = ""; // clear the field;
if(event.value ! = "")
// populate line row field with the row value;
this.getField("LineRow1").value = "001";
The above code will only update the low row field when the description field is changed and not every time the form is recalculated. On a larger form this can make the form more responsive to user input.
With some planning you might be able to make the code more automatic and not need to edit each row of the form.