Copy link to clipboard
Copied
I'm trying to create a simple weekly task list. I want to create a field, in this case it would be "MCB1", that when I press that button, the box (MCB1) will show the current date and time. Although I found a way to populate the date and time in the box, the field updates whenever other box is pressed. I was hoping to find a way to record the date and time and not have field update again.
Set condition to populate field only when it's empty:
if(this.getField("MCB1").valueAsString == ""){
//Your script goes here...
}
Copy link to clipboard
Copied
What script does you use? Where does you use the script?
Copy link to clipboard
Copied
This is the one I found online. MB1 is a check box that you would have to push to fill in the date/time for MCB1.
event.value = this.getField("MB1").value=="Off" ? "" : util.printd("HH:MM", new Date());
Copy link to clipboard
Copied
Set condition to populate field only when it's empty:
if(this.getField("MCB1").valueAsString == ""){
//Your script goes here...
}