Changing case for note titles

Hi,

I am creating a web archive of read it later stories. I am using a smart rule to title each story on import using sortdate - name format. But I would like the name to appear as all lowercase to match the format of all my other DEVONthink files. Is this possible?

Afaik not with a smart rule itself. Using a script inside the rule, it should be trivial

function performsmartrule(records) {
records.forEach(r => r.name = r.name().toLower());
}

That’s JavaScript, the same can be done in AppleScript, I believe.

Thanks, that seems to potentially solve the issue. However, I am struggling a bit to know how to insert the script within the smart rule - bit new to this I’m afraid!

That’s described in the manual. Copy/paste the code into the box appearing when you select “execute script/JavaScript/edit script” (not sure about the exact wording), overwriting the predefined script that appears in the box.

Note that I did not test the code, I just wrote down what should work. Also note that the script lowercases the complete name, so if your “sortable date” contains strings, they’ll be lowercased. More code would be needed if that must be prevented.