Reputation: 987
I'm trying to get the documents which match my codes criteria:
var allrelevant:NotesDocumentCollection = db.search("Sender='sender'" + "To='addressee'");
db is a NotesDatabase that I have defined earlier in the code. The .search()
works okay with 1 string (for example "Sender='sender'") but I can't figure out how to search database with 2 conditions (2 strings). How can I do that?
Upvotes: 1
Views: 132
Reputation: 12060
The search- string is an @Formula- Syntax as you would use it in a view selection formula and can contain all elements that are allowed in that context.
If @Formula there are the logical operators:
& - and
| - Or
! - not
Your search for multiple fields would then be:
Sender='sender' & To='addressee'
or in your example
"Sender='sender'" + "&" + "To='addressee'"
Upvotes: 2