on performSmartRule(theRecords)
tell application id "DNtp"
repeat with theRecord in theRecords
if (count paragraphs) of (plain text of theRecord as string) = 1 then
set currentLocation to (parent 1 of theRecord)
repeat with deadRecord in ((children of currentLocation) whose (type of it) is not formatted note)
set name of deadRecord to (name of theRecord as string)
move record deadRecord to parent 1 of currentLocation
move record currentLocation to trash group of (database of theRecord)
end repeat
end if
end repeat
end tell
end performSmartRule
7 Likes