Field names are strings and therefore must be enclosed in double-quotes.
Also, the way you use the assignment operator (a = b = c) is not recommended.
You should split these lines like so: a = b; c = b; or a = c; b = c; or whatever it is you're trying to achieve...
Is this better?
// --- Start of code ---
// set field's defaultValue to the value of the field
this.getField("1 Date").value = util.printd("mm/dd/yyyy", new Date());
this.getField("1 Date").defaultValue = this.getField("1 Date").value;
this.getField("3 NC No").value = new Date().getTime().toString();
this.getField("3 NC No").defaultValue = this.getField("3 NC No").value;
// confirm reset operation
if (app.alert("Do you really want to clear all fields of this form?", 2, 1) == 1)
this.resetForm(); // reset all form fields to default values
// --- End of code ---
As far as syntax goes, yes. If it does what you want it to do is another
It appears to be working as desired. Thank you for your help try67.