J
Jim
Hello,
I know how to implement an OR based find filter 'A Or B':
strFilter = _
"[Business Phone] = """ & strNumber & """ Or " & _
"[Home Phone] = """ & strNumber & """"
and I know how to implement an AND based find filter 'A And B':
strFilter = "[FullName] = """ & strName & """ And " & _
"[BusinessTelephoneNumber] = """ & strNumber & """"
But how do I specify an '((A Or B Or C) And D)' find filter?
I want to select a Contact item that matches any one of several
Contact phone number fields against a value, and that also matches
against a name field.
Conceptually (with the quotes removed for readability), this would be
something like:
strFilter = _
[ [Business Phone] = strNumber Or
[Home Phone] = strNumber Or
[Mobile Phone] = strNumber Or ]
And
[ [FullName] = strName ]
If this is possible, I would appreciate a minimal code snippet that
shows compilable syntax, with quotes/etc.
Am I thinking about this right, using the find filter? Or should I
just write code to search the Contact folder myself, where I have full
control and can get as fancy as I want with selection logic?
If the find filter will support complex searches, I assume that it is
somehow more efficient than coming back to my Add-In for processing
for each Contact item in the folder. Is that correct? Is there real
merit in pursuing a find filter based solution?
Thanks.
Jim
I know how to implement an OR based find filter 'A Or B':
strFilter = _
"[Business Phone] = """ & strNumber & """ Or " & _
"[Home Phone] = """ & strNumber & """"
and I know how to implement an AND based find filter 'A And B':
strFilter = "[FullName] = """ & strName & """ And " & _
"[BusinessTelephoneNumber] = """ & strNumber & """"
But how do I specify an '((A Or B Or C) And D)' find filter?
I want to select a Contact item that matches any one of several
Contact phone number fields against a value, and that also matches
against a name field.
Conceptually (with the quotes removed for readability), this would be
something like:
strFilter = _
[ [Business Phone] = strNumber Or
[Home Phone] = strNumber Or
[Mobile Phone] = strNumber Or ]
And
[ [FullName] = strName ]
If this is possible, I would appreciate a minimal code snippet that
shows compilable syntax, with quotes/etc.
Am I thinking about this right, using the find filter? Or should I
just write code to search the Contact folder myself, where I have full
control and can get as fancy as I want with selection logic?
If the find filter will support complex searches, I assume that it is
somehow more efficient than coming back to my Add-In for processing
for each Contact item in the folder. Is that correct? Is there real
merit in pursuing a find filter based solution?
Thanks.
Jim