Answered
I'm trying to check field value using a button action. If it is empty, I want to add the text "N/A". If not empty, leave existing text.
Here is my code but I can't get it to work?
var f = this.getField("codeNumber").value;
event.target.value = event.target.defaultValue;
if (f.value ==""){
f.value = "N/A";
}else{
f.value = event.target.Value; }
Thanks in advance
Here's the code
var fieldName = "codeNumber"; // establish field name to process
if (getField(fieldName).value == "")
this.getField(fieldName).value = "N/A"