Hi,
You need to first pull the current value from the textarea, and then append the new text to it before adding it again to the field. Something like this:
...
...
var TIME = new Date();
var currentTEXT = getFieldValue("Comments") + "\n;
if(ACMS =="Submitted for Access") {
setFieldValue("Comments",currentTEXT+"AML_DEFECT – Submitted for Access ("+AGENT+" "+TIME+")");
}else{
setFieldValue("Comments",currentTEXT+"AML_DEFECT – Access Request completed ("+AGENT+" "+TIME+")");
}
...
...
Please note that I have appended “\n” to the “currentTEXT” variable to add a linefeed in the textarea.
Let me know how it work out,
Alexander