Smart Rule that has if, then and multiple else

I am a old retired mainframe programmer and I can not figure out, other than writing an AppleScript (I know how to do that), how to get a smart rule to do one thing if the file tag equals “A” and another thing if the file tag equals “B”. Maybe I just can’t figure out how to nest all/any statements in a smart rule. In general, I want to distribute files coming into the inbox to the proper database based on the file’s tag which will have been previously set.

For different actions two smart rules are required. Or a script.

Thanks. Saved me a lot of frustration.

Move to a User Input placeholder would be cool :slight_smile:

1 Like

But not sufficient to implement branching smart rules, I suppose.

You can use placeholders in the File action.

True, but you often need to use a Move action to get the item into the appropriate database first, then File it second… unless you’re hiding a secret syntax to target a database with a location in the File action :slight_smile:

Since my example only had two databases, it looks like I need to create a AppleScript since I really have 9 databases to choose from. The help I have received from you guys has always been spot-on. Your efforts are much appreciated.
I am now wondering if my files can be sent to the correct database based on something in the new AI ???

1 Like

Possibly, but…

  1. If you have privacy concerns, be aware your data is going out to a third-party.
  2. Have you tried the Tools > Inspectors > See Also & Classify inspector to see where DEVONthink suggests filing the document?

No. I will look at that. Thanks.

You’re welcome :slight_smile:

The existing smart rule script File Items Using @Destination in Name might be useful, see smart rule action Apply Script or folder ~/Library/Application Scripts/com.devon-technologies.think3/Smart Rules (~/Library/Application Scripts/com.devon-technologies.think/Smart Rules in case of DEVONthink 4)