Right now, I’d like to add an attribute $Done with the current timestamp when I drag a note or an alias to a note labeled “Archive.” Here’s a screenshot so you can see the interaction I hope to achieve.
I’ve looked up OnAdd and date(“today”) and I’ve tried several things, but odd things are happening and so I thought I’d come here to see if there might be someone who can suggest a couple stepwise things I might do to get it work.
Adding the $Prototype in the on-add action isn’t necessary, but I find it useful. (For completeness, this is normally how $OnAdd is defined – using the Action Inspector. Though, it can be done other ways.)
FWIW, and not to critique @derekvan’s example, the best practice for setting a date either as a string (e.g. “1 Oct 2018” or such) or as a designator like today is to use date(). Thus:
$Done = date("today");
The designators “now” and “today” both give the same result. Double quotes or single quotes can be used around the string. Double seems just to be the prevailing practice.