I tried both codes, but now the field is no more working for alphabetic characters and is instead monitoring the numeric value (if I typed 4 is "OK", while 3 is ""), not the length. The field "ATA" must contain 4 numeric characters (0000, 2500, 3453, etc) and I placed 2 controls: the first is the maximum number of characters (4), the second is a JS in the ATA field (Validate TAB) to avoid a code of less than 4 characters:
var cNum = getField("ATA");
if (event.value.length < 4) {var msg = "Please enter 4 characters for the ATA!";
app.alert(msg, 1, 0, "Character Limit Error");
event.target.fillColor = color.red;
cNum.value = "";}
else {event.target.fillColor = color.transparent;
cNum.value = event.value;
}
Now I need to populate this additional field "TEST" when the data in "ATA" is correct, but the numeric format seems to be a problem ...