Trigger smart rule when changing Finder Comment?

Is it possible to trigger a Smart Rule when I change certain metadata, such as the Finder Comment? I thought maybe ‘After Saving’ would do that, but that doesn’t seem to be the case. Is this possible?

That’s not possible, After/before saving is only triggered when changing the document’s content.

I guess, changing the comment in DT is instantaneous. You type “c”, the comment is “c”. You type “o”, the comment is “co”. You type “n”, the comment is “con”, you correct with delete, the comment is “co” again.
Long story short: there’s not really a point in time when the comment is really changed, since there’s no “save” command for documents in DT.
If (!) all this is true, the condition you’re looking for would fire for every single keystroke. I doubt that that’s a good idea.

1 Like

That makes sense. I think I’ll write some ‘Verify and repair’ type script to keep my Finder comments and excerpts in my Markdown annotation files in sync. I can always create an ‘on demand’ script at least to trigger updates manually.

I just thought of this again: when I’m editing an annotation in the Info panel, the annotation is only saved after the Annotation text input box loses focus. Could this not work the same for updating finder comments (and therefore be a trigger event?)

Losing the focus in some input field? I can’t speak for the developers, but I wouldn’t go for that. Focus is transferred quite often, so a lot of events occur that have to be compared against rules.

What is your use case?

Not a a general trigger - that would be terrible :slight_smile: No, my suggestion is similar to the Annotation Note field. When the Finder Comments field in the Inspector loses focus, the comment is saved. When the Finder Comment are saved an event is triggered.

My use case is syncing finder comments to my annotation file.

Re finder comments, you might perhaps want to read this

Secondly, maybe a rule executing every hour (or something like that) would be helpful? Of course, depending on how often you need to sync.

I suppose that the current implementation of smart rules (and their triggers) is the limiting factor here. Imagine someone defines a ton of custom metadata fields and wants to trigger smart rules when on of them changes (aka “is saved”)… the UI for that will be terrible. Even without custom meta data fields, as it stands, one would need an entry for every text input field that might change in the “Run on” section. Maybe “Hash value changed” would be a possibility (if that changes along with finder comments and other metadata). @cgrunenberg would know more about that.

DEVONthink just mirrors its comments to the Finder but uses its own internal storage. And therefore the size is unlimited contrary to Finder comments (and the reliability shouldn’t be an issue).

I was wondering about the possibility to trigger a rule on “any change at all” (kind of), like when the hash value of the record changes. That would possibly permit for the use case the OP has.

Possible but currently not planned, theoretically there could be a trigger for every possible change but just imagine the size of the popup :slight_smile:

1 Like

Hash value change trigger would indeed be very useful. Especially with indexed records. I’m fine with any size popup :slight_smile: