PC Review


Reply
Thread Tools Rate Thread

How to check a new item against a filtered view to see if it matches?

 
 
John Riddle
Guest
Posts: n/a
 
      7th Sep 2005
Hello,

I have some custom code that allows a user to save a view (such as when they
run a filter against items in a public folder). Now the users want a
notification when a new item is added to the folder that fits one of their
custom filters. I can easily create a newitem event for the folder and then
check the custom views whenever an item is added to get the various filters
that might be applied. The resulting filtered part of the XML would look like
this:

<filter>(&quot;urn:schemas:httpmail:textdescription&quot; LIKE '%oracle%' AND
&quot;urn:schemas:httpmail:textdescription&quot; LIKE '%java%' AND
&quot;urn:schemas:httpmail:textdescription&quot; LIKE '%unix%')</filter>

Now, I don't want to run each saved filter against the folder and check to see
if any of the resulting items match the item just added. That would hang the
user's computer for too long each and every time an item was added to the
public folder. What I would like to do is simply check this filter against the
one (1) new item itself.

Can somebody tell me if there's an easy way to see if the new item's (contact
item) properties match those specified in the custom filter?

Thanks,

John


 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      8th Sep 2005
If I understand what you want you can set up an Items collection handler
class for each folder of interest and store those classes in a collection to
keep the references alive. Then you can handle the ItemAdd event, which
passes you the Item that was added. It's like using Explorer and Inspector
wrappers.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"John Riddle" <jriddleatsignwilsongroupnyperiodcom> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> I have some custom code that allows a user to save a view (such as when
> they
> run a filter against items in a public folder). Now the users want a
> notification when a new item is added to the folder that fits one of their
> custom filters. I can easily create a newitem event for the folder and
> then
> check the custom views whenever an item is added to get the various
> filters
> that might be applied. The resulting filtered part of the XML would look
> like
> this:
>
> <filter>(&quot;urn:schemas:httpmail:textdescription&quot; LIKE '%oracle%'
> AND
> &quot;urn:schemas:httpmail:textdescription&quot; LIKE '%java%' AND
> &quot;urn:schemas:httpmail:textdescription&quot; LIKE '%unix%')</filter>
>
> Now, I don't want to run each saved filter against the folder and check to
> see
> if any of the resulting items match the item just added. That would hang
> the
> user's computer for too long each and every time an item was added to the
> public folder. What I would like to do is simply check this filter against
> the
> one (1) new item itself.
>
> Can somebody tell me if there's an easy way to see if the new item's
> (contact
> item) properties match those specified in the custom filter?
>
> Thanks,
>
> John
>
>


 
Reply With Quote
 
=?Utf-8?B?RXJpYyBMZWdhdWx0IFtNVlAgLSBPdXRsb29rXQ==
Guest
Posts: n/a
 
      8th Sep 2005
I can think of a few ways to handle this, but I'm not sure which is the best
approach:

- you can use the AdvancedSearch method to return a result set using the
current filter, and loop through it to see if the new message is in there; it
*shouldn't* consume too much time, but test and see
- what about tracking the last message counts for the particular view (or
all of them), and when the new item comes in, see if the message count for
the folder with the view applied has incremented by one - if it has, then the
message satisfied that criteria
- otherwise you'd have to extract the DASL properties from the filter, and
map it to the relevant Outlook Object Model property. This would probabaly
involve reading the mapped values from a file though, unless you laboriously
coded the mappings. You can see the mappings on OutlookCode.com at
http://www.outlookcode.com/files/schema.zip

--
Eric Legault - B.A, MCP, MCDBA, MCSD (VS 6.0), Outlook MVP
Try Picture Attachments Wizard - http://tinyurl.com/ckytm
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/


"John Riddle" wrote:

> Hello,
>
> I have some custom code that allows a user to save a view (such as when they
> run a filter against items in a public folder). Now the users want a
> notification when a new item is added to the folder that fits one of their
> custom filters. I can easily create a newitem event for the folder and then
> check the custom views whenever an item is added to get the various filters
> that might be applied. The resulting filtered part of the XML would look like
> this:
>
> <filter>("urn:schemas:httpmail:textdescription" LIKE '%oracle%' AND
> "urn:schemas:httpmail:textdescription" LIKE '%java%' AND
> "urn:schemas:httpmail:textdescription" LIKE '%unix%')</filter>
>
> Now, I don't want to run each saved filter against the folder and check to see
> if any of the resulting items match the item just added. That would hang the
> user's computer for too long each and every time an item was added to the
> public folder. What I would like to do is simply check this filter against the
> one (1) new item itself.
>
> Can somebody tell me if there's an easy way to see if the new item's (contact
> item) properties match those specified in the custom filter?
>
> Thanks,
>
> John
>
>
>

 
Reply With Quote
 
John Riddle
Guest
Posts: n/a
 
      8th Sep 2005
Eric,

Thanks. That gave me some really good ideas. How do I get the Message Count
for a VIEW? I know how to do this for an Items Collection, but that doesn't
help me to know if the new item is also part of the filtered results.

I've looked at the properties for the View object and there doesn't seem to be
a "count" property. I could of coarse, apply the filter and get the items
count, but that general takes 2-10 seconds depending upon the complexity of
the filter. I can't lockup everyone's computer for 2-10 seconds every time
anyone else in the office saves a contact. People would be constantly
interupted from what they were doing in Outlook just to check if by chance the
new contact saved by someone else matches a very specific search that they had
saved.

I have over 150 custom properties in my custom contact form so I'd have to add
these to the list to use option 3. Actually, option 3 was what I thought I'd
have to do originally, but was hoping for an easier solution if available as
I'm not sure if that would hange outlook as well each time the code processed.

Thanks,

John


"Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in
message news:9F1EE6D5-A98B-4072-9515-(E-Mail Removed)...
I can think of a few ways to handle this, but I'm not sure which is the best
approach:

- you can use the AdvancedSearch method to return a result set using the
current filter, and loop through it to see if the new message is in there; it
*shouldn't* consume too much time, but test and see
- what about tracking the last message counts for the particular view (or
all of them), and when the new item comes in, see if the message count for
the folder with the view applied has incremented by one - if it has, then the
message satisfied that criteria
- otherwise you'd have to extract the DASL properties from the filter, and
map it to the relevant Outlook Object Model property. This would probabaly
involve reading the mapped values from a file though, unless you laboriously
coded the mappings. You can see the mappings on OutlookCode.com at
http://www.outlookcode.com/files/schema.zip

--
Eric Legault - B.A, MCP, MCDBA, MCSD (VS 6.0), Outlook MVP
Try Picture Attachments Wizard - http://tinyurl.com/ckytm
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/


"John Riddle" wrote:

> Hello,
>
> I have some custom code that allows a user to save a view (such as when they
> run a filter against items in a public folder). Now the users want a
> notification when a new item is added to the folder that fits one of their
> custom filters. I can easily create a newitem event for the folder and then
> check the custom views whenever an item is added to get the various filters
> that might be applied. The resulting filtered part of the XML would look
> like
> this:
>
> <filter>("urn:schemas:httpmail:textdescription" LIKE '%oracle%' AND
> "urn:schemas:httpmail:textdescription" LIKE '%java%' AND
> "urn:schemas:httpmail:textdescription" LIKE '%unix%')</filter>
>
> Now, I don't want to run each saved filter against the folder and check to
> see
> if any of the resulting items match the item just added. That would hang the
> user's computer for too long each and every time an item was added to the
> public folder. What I would like to do is simply check this filter against
> the
> one (1) new item itself.
>
> Can somebody tell me if there's an easy way to see if the new item's
> (contact
> item) properties match those specified in the custom filter?
>
> Thanks,
>
> John
>
>
>



 
Reply With Quote
 
John Riddle
Guest
Posts: n/a
 
      8th Sep 2005
Ken,

Thanks for your attention to this. Yes, I've already created the items
collection and am using the Item_Add event of that collection to get the new
item. The question was about how to take that item and easily match it to a
saved view (specifically, the filtered part of the view(s) saved in the user's
profile) to see if there was a match without interupting the users' activities
or spending more time on the code than it's worth. (I have 10 users and I
don't get paid for the programming, so I don't want to spend more of my time
than it's worth. If there's a fairly easy method, then great, I'll do it).

I can extract the XML of the view and see the filtered code such as:

<filter>(&quot;urn:schemas:httpmail:textdescription&quot; LIKE '%oracle%'
AND
&quot;urn:schemas:httpmail:textdescription&quot; LIKE '%java%' AND
&quot;urn:schemas:httpmail:textdescription&quot; LIKE '%unix%')</filter>

This however, is an example of a "simple" filter. Other filters have multiple
levels of AND/OR's and filter on many different custom properties.

Thanks,

John


"Ken Slovak - [MVP - Outlook]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
If I understand what you want you can set up an Items collection handler
class for each folder of interest and store those classes in a collection to
keep the references alive. Then you can handle the ItemAdd event, which
passes you the Item that was added. It's like using Explorer and Inspector
wrappers.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"John Riddle" <jriddleatsignwilsongroupnyperiodcom> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> I have some custom code that allows a user to save a view (such as when
> they
> run a filter against items in a public folder). Now the users want a
> notification when a new item is added to the folder that fits one of their
> custom filters. I can easily create a newitem event for the folder and
> then
> check the custom views whenever an item is added to get the various
> filters
> that might be applied. The resulting filtered part of the XML would look
> like
> this:
>
> <filter>(&quot;urn:schemas:httpmail:textdescription&quot; LIKE '%oracle%'
> AND
> &quot;urn:schemas:httpmail:textdescription&quot; LIKE '%java%' AND
> &quot;urn:schemas:httpmail:textdescription&quot; LIKE '%unix%')</filter>
>
> Now, I don't want to run each saved filter against the folder and check to
> see
> if any of the resulting items match the item just added. That would hang
> the
> user's computer for too long each and every time an item was added to the
> public folder. What I would like to do is simply check this filter against
> the
> one (1) new item itself.
>
> Can somebody tell me if there's an easy way to see if the new item's
> (contact
> item) properties match those specified in the custom filter?
>
> Thanks,
>
> John
>
>



 
Reply With Quote
 
=?Utf-8?B?RXJpYyBMZWdhdWx0IFtNVlAgLSBPdXRsb29rXQ==
Guest
Posts: n/a
 
      8th Sep 2005
Yeah, you'd have to set the View to apply the filter, and then access the
Items.Count property, so you are still faced with a delay.

A better option is to implement this logic in an Exchange Event Sink
published to that folder. Then all the processing will be server side, and
the sink can also send notification messages when the criteria is satisfied.

--
Eric Legault - B.A, MCP, MCDBA, MCSD (VS 6.0), Outlook MVP
Try Picture Attachments Wizard - http://tinyurl.com/ckytm
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/


"John Riddle" wrote:

> Eric,
>
> Thanks. That gave me some really good ideas. How do I get the Message Count
> for a VIEW? I know how to do this for an Items Collection, but that doesn't
> help me to know if the new item is also part of the filtered results.
>
> I've looked at the properties for the View object and there doesn't seem to be
> a "count" property. I could of coarse, apply the filter and get the items
> count, but that general takes 2-10 seconds depending upon the complexity of
> the filter. I can't lockup everyone's computer for 2-10 seconds every time
> anyone else in the office saves a contact. People would be constantly
> interupted from what they were doing in Outlook just to check if by chance the
> new contact saved by someone else matches a very specific search that they had
> saved.
>
> I have over 150 custom properties in my custom contact form so I'd have to add
> these to the list to use option 3. Actually, option 3 was what I thought I'd
> have to do originally, but was hoping for an easier solution if available as
> I'm not sure if that would hange outlook as well each time the code processed.
>
> Thanks,
>
> John
>
>
> "Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in
> message news:9F1EE6D5-A98B-4072-9515-(E-Mail Removed)...
> I can think of a few ways to handle this, but I'm not sure which is the best
> approach:
>
> - you can use the AdvancedSearch method to return a result set using the
> current filter, and loop through it to see if the new message is in there; it
> *shouldn't* consume too much time, but test and see
> - what about tracking the last message counts for the particular view (or
> all of them), and when the new item comes in, see if the message count for
> the folder with the view applied has incremented by one - if it has, then the
> message satisfied that criteria
> - otherwise you'd have to extract the DASL properties from the filter, and
> map it to the relevant Outlook Object Model property. This would probabaly
> involve reading the mapped values from a file though, unless you laboriously
> coded the mappings. You can see the mappings on OutlookCode.com at
> http://www.outlookcode.com/files/schema.zip
>
> --
> Eric Legault - B.A, MCP, MCDBA, MCSD (VS 6.0), Outlook MVP
> Try Picture Attachments Wizard - http://tinyurl.com/ckytm
> Job: http://www.imaginets.com
> Blog: http://blogs.officezealot.com/legault/
>
>
> "John Riddle" wrote:
>
> > Hello,
> >
> > I have some custom code that allows a user to save a view (such as when they
> > run a filter against items in a public folder). Now the users want a
> > notification when a new item is added to the folder that fits one of their
> > custom filters. I can easily create a newitem event for the folder and then
> > check the custom views whenever an item is added to get the various filters
> > that might be applied. The resulting filtered part of the XML would look
> > like
> > this:
> >
> > <filter>("urn:schemas:httpmail:textdescription" LIKE '%oracle%' AND
> > "urn:schemas:httpmail:textdescription" LIKE '%java%' AND
> > "urn:schemas:httpmail:textdescription" LIKE '%unix%')</filter>
> >
> > Now, I don't want to run each saved filter against the folder and check to
> > see
> > if any of the resulting items match the item just added. That would hang the
> > user's computer for too long each and every time an item was added to the
> > public folder. What I would like to do is simply check this filter against
> > the
> > one (1) new item itself.
> >
> > Can somebody tell me if there's an easy way to see if the new item's
> > (contact
> > item) properties match those specified in the custom filter?
> >
> > Thanks,
> >
> > John
> >
> >
> >

>
>
>

 
Reply With Quote
 
John Riddle
Guest
Posts: n/a
 
      9th Sep 2005
Yeah, I tried it the other way and it is VERY slow. Can use that for the
users.

I've never written an Exchange Event Sink. Is there a sample one available
that I could modify with my own processing code?

Thanks,

John


"Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in
message news:E95E3E54-3611-4261-B434-(E-Mail Removed)...
Yeah, you'd have to set the View to apply the filter, and then access the
Items.Count property, so you are still faced with a delay.

A better option is to implement this logic in an Exchange Event Sink
published to that folder. Then all the processing will be server side, and
the sink can also send notification messages when the criteria is satisfied.

--
Eric Legault - B.A, MCP, MCDBA, MCSD (VS 6.0), Outlook MVP
Try Picture Attachments Wizard - http://tinyurl.com/ckytm
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/


"John Riddle" wrote:

> Eric,
>
> Thanks. That gave me some really good ideas. How do I get the Message Count
> for a VIEW? I know how to do this for an Items Collection, but that doesn't
> help me to know if the new item is also part of the filtered results.
>
> I've looked at the properties for the View object and there doesn't seem to
> be
> a "count" property. I could of coarse, apply the filter and get the items
> count, but that general takes 2-10 seconds depending upon the complexity of
> the filter. I can't lockup everyone's computer for 2-10 seconds every time
> anyone else in the office saves a contact. People would be constantly
> interupted from what they were doing in Outlook just to check if by chance
> the
> new contact saved by someone else matches a very specific search that they
> had
> saved.
>
> I have over 150 custom properties in my custom contact form so I'd have to
> add
> these to the list to use option 3. Actually, option 3 was what I thought I'd
> have to do originally, but was hoping for an easier solution if available as
> I'm not sure if that would hange outlook as well each time the code
> processed.
>
> Thanks,
>
> John
>
>
> "Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in
> message news:9F1EE6D5-A98B-4072-9515-(E-Mail Removed)...
> I can think of a few ways to handle this, but I'm not sure which is the best
> approach:
>
> - you can use the AdvancedSearch method to return a result set using the
> current filter, and loop through it to see if the new message is in there;
> it
> *shouldn't* consume too much time, but test and see
> - what about tracking the last message counts for the particular view (or
> all of them), and when the new item comes in, see if the message count for
> the folder with the view applied has incremented by one - if it has, then
> the
> message satisfied that criteria
> - otherwise you'd have to extract the DASL properties from the filter, and
> map it to the relevant Outlook Object Model property. This would probabaly
> involve reading the mapped values from a file though, unless you laboriously
> coded the mappings. You can see the mappings on OutlookCode.com at
> http://www.outlookcode.com/files/schema.zip
>
> --
> Eric Legault - B.A, MCP, MCDBA, MCSD (VS 6.0), Outlook MVP
> Try Picture Attachments Wizard - http://tinyurl.com/ckytm
> Job: http://www.imaginets.com
> Blog: http://blogs.officezealot.com/legault/
>
>
> "John Riddle" wrote:
>
> > Hello,
> >
> > I have some custom code that allows a user to save a view (such as when
> > they
> > run a filter against items in a public folder). Now the users want a
> > notification when a new item is added to the folder that fits one of their
> > custom filters. I can easily create a newitem event for the folder and
> > then
> > check the custom views whenever an item is added to get the various
> > filters
> > that might be applied. The resulting filtered part of the XML would look
> > like
> > this:
> >
> > <filter>("urn:schemas:httpmail:textdescription" LIKE '%oracle%' AND
> > "urn:schemas:httpmail:textdescription" LIKE '%java%' AND
> > "urn:schemas:httpmail:textdescription" LIKE '%unix%')</filter>
> >
> > Now, I don't want to run each saved filter against the folder and check to
> > see
> > if any of the resulting items match the item just added. That would hang
> > the
> > user's computer for too long each and every time an item was added to the
> > public folder. What I would like to do is simply check this filter against
> > the
> > one (1) new item itself.
> >
> > Can somebody tell me if there's an easy way to see if the new item's
> > (contact
> > item) properties match those specified in the custom filter?
> >
> > Thanks,
> >
> > John
> >
> >
> >

>
>
>



 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      9th Sep 2005
You'd have to write code to analyze each view then, converting the XML and
the DASL syntax for the property tags into something you can use in your
code. Nothing easy I'm afraid.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"John Riddle" <jriddleatsignwilsongroupnyperiodcom> wrote in message
news:(E-Mail Removed)...
> Ken,
>
> Thanks for your attention to this. Yes, I've already created the items
> collection and am using the Item_Add event of that collection to get the
> new
> item. The question was about how to take that item and easily match it to
> a
> saved view (specifically, the filtered part of the view(s) saved in the
> user's
> profile) to see if there was a match without interupting the users'
> activities
> or spending more time on the code than it's worth. (I have 10 users and I
> don't get paid for the programming, so I don't want to spend more of my
> time
> than it's worth. If there's a fairly easy method, then great, I'll do it).
>
> I can extract the XML of the view and see the filtered code such as:
>
> <filter>(&quot;urn:schemas:httpmail:textdescription&quot; LIKE '%oracle%'
> AND
> &quot;urn:schemas:httpmail:textdescription&quot; LIKE '%java%' AND
> &quot;urn:schemas:httpmail:textdescription&quot; LIKE '%unix%')</filter>
>
> This however, is an example of a "simple" filter. Other filters have
> multiple
> levels of AND/OR's and filter on many different custom properties.
>
> Thanks,
>
> John


 
Reply With Quote
 
=?Utf-8?B?RXJpYyBMZWdhdWx0IFtNVlAgLSBPdXRsb29rXQ==
Guest
Posts: n/a
 
      9th Sep 2005
There is a sample VB6 project in the Exchange SDK Tools download:

Download details: Exchange SDK Development Tools:
http://www.microsoft.com/downloads/d...playlang=en%20

Also grab the full SDK (links at the bottom of above). For newsgroup
support, see microsoft.public.exchange.development.

Events sinks can be daunting at first, but once you master the basics you
have a lot of power at your hands, far beyond what VBA/VB event hooks with
the Outlook Object Model, the Rules Wizard or the Folder Assistant can offer.

--
Eric Legault - B.A, MCP, MCDBA, MCSD (VS 6.0), Outlook MVP
Try Picture Attachments Wizard - http://tinyurl.com/ckytm
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/


"John Riddle" wrote:

> Yeah, I tried it the other way and it is VERY slow. Can use that for the
> users.
>
> I've never written an Exchange Event Sink. Is there a sample one available
> that I could modify with my own processing code?
>
> Thanks,
>
> John
>
>
> "Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in
> message news:E95E3E54-3611-4261-B434-(E-Mail Removed)...
> Yeah, you'd have to set the View to apply the filter, and then access the
> Items.Count property, so you are still faced with a delay.
>
> A better option is to implement this logic in an Exchange Event Sink
> published to that folder. Then all the processing will be server side, and
> the sink can also send notification messages when the criteria is satisfied.
>
> --
> Eric Legault - B.A, MCP, MCDBA, MCSD (VS 6.0), Outlook MVP
> Try Picture Attachments Wizard - http://tinyurl.com/ckytm
> Job: http://www.imaginets.com
> Blog: http://blogs.officezealot.com/legault/
>
>
> "John Riddle" wrote:
>
> > Eric,
> >
> > Thanks. That gave me some really good ideas. How do I get the Message Count
> > for a VIEW? I know how to do this for an Items Collection, but that doesn't
> > help me to know if the new item is also part of the filtered results.
> >
> > I've looked at the properties for the View object and there doesn't seem to
> > be
> > a "count" property. I could of coarse, apply the filter and get the items
> > count, but that general takes 2-10 seconds depending upon the complexity of
> > the filter. I can't lockup everyone's computer for 2-10 seconds every time
> > anyone else in the office saves a contact. People would be constantly
> > interupted from what they were doing in Outlook just to check if by chance
> > the
> > new contact saved by someone else matches a very specific search that they
> > had
> > saved.
> >
> > I have over 150 custom properties in my custom contact form so I'd have to
> > add
> > these to the list to use option 3. Actually, option 3 was what I thought I'd
> > have to do originally, but was hoping for an easier solution if available as
> > I'm not sure if that would hange outlook as well each time the code
> > processed.
> >
> > Thanks,
> >
> > John
> >
> >
> > "Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in
> > message news:9F1EE6D5-A98B-4072-9515-(E-Mail Removed)...
> > I can think of a few ways to handle this, but I'm not sure which is the best
> > approach:
> >
> > - you can use the AdvancedSearch method to return a result set using the
> > current filter, and loop through it to see if the new message is in there;
> > it
> > *shouldn't* consume too much time, but test and see
> > - what about tracking the last message counts for the particular view (or
> > all of them), and when the new item comes in, see if the message count for
> > the folder with the view applied has incremented by one - if it has, then
> > the
> > message satisfied that criteria
> > - otherwise you'd have to extract the DASL properties from the filter, and
> > map it to the relevant Outlook Object Model property. This would probabaly
> > involve reading the mapped values from a file though, unless you laboriously
> > coded the mappings. You can see the mappings on OutlookCode.com at
> > http://www.outlookcode.com/files/schema.zip
> >
> > --
> > Eric Legault - B.A, MCP, MCDBA, MCSD (VS 6.0), Outlook MVP
> > Try Picture Attachments Wizard - http://tinyurl.com/ckytm
> > Job: http://www.imaginets.com
> > Blog: http://blogs.officezealot.com/legault/
> >
> >
> > "John Riddle" wrote:
> >
> > > Hello,
> > >
> > > I have some custom code that allows a user to save a view (such as when
> > > they
> > > run a filter against items in a public folder). Now the users want a
> > > notification when a new item is added to the folder that fits one of their
> > > custom filters. I can easily create a newitem event for the folder and
> > > then
> > > check the custom views whenever an item is added to get the various
> > > filters
> > > that might be applied. The resulting filtered part of the XML would look
> > > like
> > > this:
> > >
> > > <filter>("urn:schemas:httpmail:textdescription" LIKE '%oracle%' AND
> > > "urn:schemas:httpmail:textdescription" LIKE '%java%' AND
> > > "urn:schemas:httpmail:textdescription" LIKE '%unix%')</filter>
> > >
> > > Now, I don't want to run each saved filter against the folder and check to
> > > see
> > > if any of the resulting items match the item just added. That would hang
> > > the
> > > user's computer for too long each and every time an item was added to the
> > > public folder. What I would like to do is simply check this filter against
> > > the
> > > one (1) new item itself.
> > >
> > > Can somebody tell me if there's an easy way to see if the new item's
> > > (contact
> > > item) properties match those specified in the custom filter?
> > >
> > > Thanks,
> > >
> > > John
> > >
> > >
> > >

> >
> >
> >

>
>
>

 
Reply With Quote
 
John Riddle
Guest
Posts: n/a
 
      12th Sep 2005
Yep, that's what I suspected. Didn't know if there was a way to treat the item
passed as a collection of 1 item and apply the filter to it somehow. Perhaps I
could copy the items to a temp folder, apply the views to those folders every
hour or so with just a few items in the folder and if a match is made find the
real item in the Public Folder and send a link to it to the user. Pretty messy
work around.

John

"Ken Slovak - [MVP - Outlook]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
You'd have to write code to analyze each view then, converting the XML and
the DASL syntax for the property tags into something you can use in your
code. Nothing easy I'm afraid.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"John Riddle" <jriddleatsignwilsongroupnyperiodcom> wrote in message
news:(E-Mail Removed)...
> Ken,
>
> Thanks for your attention to this. Yes, I've already created the items
> collection and am using the Item_Add event of that collection to get the
> new
> item. The question was about how to take that item and easily match it to
> a
> saved view (specifically, the filtered part of the view(s) saved in the
> user's
> profile) to see if there was a match without interupting the users'
> activities
> or spending more time on the code than it's worth. (I have 10 users and I
> don't get paid for the programming, so I don't want to spend more of my
> time
> than it's worth. If there's a fairly easy method, then great, I'll do it).
>
> I can extract the XML of the view and see the filtered code such as:
>
> <filter>(&quot;urn:schemas:httpmail:textdescription&quot; LIKE '%oracle%'
> AND
> &quot;urn:schemas:httpmail:textdescription&quot; LIKE '%java%' AND
> &quot;urn:schemas:httpmail:textdescription&quot; LIKE '%unix%')</filter>
>
> This however, is an example of a "simple" filter. Other filters have
> multiple
> levels of AND/OR's and filter on many different custom properties.
>
> Thanks,
>
> John



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i find multiple matches of one data item in an excel range DivaHouston Microsoft Excel Misc 1 7th Jan 2008 02:43 PM
How do I set up a check that matches names of companies in excel? =?Utf-8?B?U3RhY2tzMzI0?= Microsoft Excel Worksheet Functions 1 31st Aug 2007 10:26 AM
item # in one sheet want to pull data that matches from other tab =?Utf-8?B?SmVycmlI?= Microsoft Excel Worksheet Functions 3 21st May 2007 09:50 PM
Re: Item Count for filtered view Sue Mosher [MVP-Outlook] Microsoft Outlook Form Programming 0 21st Dec 2006 02:14 PM
sub item in list view item invalid bounds during DrawItem in owner draw Smokey Grindle Microsoft VB .NET 0 2nd Aug 2006 05:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:37 AM.