Alternatives for achieving transclusion within DT3 (wiki post)

A smart rule shouldn’t be processing a selection. The inly time you’d use that is if you have explicitly selected items in a smart rule and are running it On demand.

Sure, but even if I select records and run it on demand it will not work.

Now add a criteria using content matches to the smart-rule.

No issue…

Weird. Doing exactly the same thing, that is, selecting a records and running it, it works if I remove the criteria, but otherwise, it doesn’t.

In DEVONthink, hold the Option key and select Help > Report Bug. Do NOT send the email. Check the Console.log for errors.

2020-05-19 14:16:37.580 DEVONthink 3[1315:82664] Dragging multiple files using the deprecated NSFilenamesPboardType and dragging API. Please update to the NSDraggingSession API.

Doesn’t seem related. @cgrunenberg is going to have to weigh in on this.

It’s a harmless message and indeed not related.

Chris, I guess this is a bug report then. I am experiencing the same issue on two different machines even after rebooting both of them. There is no error msg in the log nor in the console. Perhaps you could try using the same criteria as I have and try to apply it to markdown files to recreate the issue.

The script depends on the selection and on windows but the selection is not identical to the theRecords parameter (and smart rule scripts should never depend on the user interface). You can test smart rule scripts like this in the AppleScript editor:

tell application id "DNtp" to my onPerformSmartRule(selection as list)

on performSmartRule(theRecords)
	...
end performSmartRule
2 Likes

Does this assume something preceding the tell application id "DNtp" to my onPerformSmartRule(selection as list) part? Maybe I am being stupid and doing something wrong, but as it is I could not get it to work at all.

No. It should work like this in the Script Editor.app but not in a smart rule.

This is what I am seeing:

Weird. This seems to be another issue of AppleScript and I could swear that I used this already several times but maybe I’m getting old or it worked before Catalina :wink: A test database plus the children of its root should work instead (using test data while developing smart rules is also a good idea)

Your handler name is incorrect.

It’s my performSmartRule() not my onPerformSmartRule.

My fault :frowning:

Aha!

Thanks, Jim :wink:

You’re welcome :slight_smile: