Reputation: 11
I have a DB with thousands of E-mails and I want to make a selection / sorting of mails which I can copy - paste into another DB.
The arguments shall be:
I struggle to find a complete formula which cover everything.
Upvotes: 1
Views: 179
Reputation: 12060
A selection formula consists of items beeing checked for content and operators to combine the different queries.
In addition there are @Functions to manipulate values to match your needs.
The sender of an email is in the From
- item. Recipients can be found in SendTo
, copy- recipients in CopyTo
, etc. etc.
You can find out the item- names by using the property- window (Alt + Enter). On the second tab there are all items that are in a specific document.
To get all mails FROM you, you would write something like:
SELECT From = "CN=YourName/OU=YourOrg"
For the exact value -> Property- window
To get all mails sent to special domains it would be:
SELECT @Contains( SendTo ; "@yahoo.com" ) | @Contains( SendTo ; "@google.com" )
@Contains is one of the @Functions. Just google for it, to get a complete list. The Designer Help is a good reference. As @Formula- Language is very powerfull working with lists, the above example could also be written as:
SELECT @Contains( SendTo ; "@yahoo.com" : "@google.com" )
Colon is the list operator....
Logical operators are: | = OR & = AND ! = NOT
Take care: & has a higher precedence than |, if you want to change that, you need to use brackets to correct the precedence...
Maybe you need a "unifier" for your operations like @Lowercase( ... )
or @Uppercase
if there are different ways you wrote the addresses in your mail. A valid formula could look like:
SELECT Form = "Memo" : "Reply" & From = "CN=YourName/OU=YourOrg" &
@Contains( @LowerCase( SendTo ) ; "@yahoo.com" : "@google.com" ) &
!@Contains( @LowerCase( CopyTo ; "@myspace.com" )
Feel free to modify it regarding to your needs
Using your example from the comment it would be:
SELECT (@Contains(From; "peter")) &
(@Contains(SendTo; "@ibm.com")) | (@Contains(SendTo; "@google.com")) &
!(@Contains(CopyTo; "myspace.com") | @Contains(CopyTo; "kitchen.com"))
Upvotes: 2
Reputation: 2359
I wouldn't copy/paste... I'd use standard Notes archiving, with multiple formulas. No agents, no programming (except for the formulas), what else can one want?
Upvotes: 0