Community
Showing results for 
Search instead for 
Do you mean 
Reply

How to filter a contactlist?

Accepted Solution Solved
Copper Super Contributor
Posts: 112
Country: Australia
Accepted Solution

How to filter a contactlist?

hi

 

i have a contactlist of contacts and what to be able to filter those items.. how can i go about this at it seems that ContactList does not have a method on it for filtering??

Basically i have an option button that asks 'all or current look up"

from that i can get either All contacts or just the current list of contacts and store them in a ContactList..

 

but now i want to filter them using a ComparisonFilterCriteria, but how do i run my filter on the ContactList

 

Dim cl As Act.Framework.Contacts.ContactList

If RadioButton1.Checked Then
   'all users
   cl = ActApplication.Instance.ActFramework.Contacts.GetContacts(Nothing)
ElseIf RadioButton2.Checked Then
   'current looked up contacts
   cl = ActApplication.Instance.ActFramework.CurrentLookupContactList
End IF

Dim fCriteria() As Act.Framework.ComparisonFilterCriteria = New Blah Blah Blah ... etc

now how to filter cl ??

 how can i get a new contactlist of contacts from filtering the current cl ContactList ??

 

Greg

 


Accepted Solutions
Solution
Accepted by topic author ozie
‎09-25-2015 03:20 AM
Employee
Posts: 1,163
Country: USA

Re: How to filter a contactlist?

The LookupManager class has a ContactLookupNarrow method with several overloads. If you have any trouble with it let me knwo and i can post an example.

Matthew Wood
Act! SDK Support
Community Moderator

View solution in original post


All Replies
Solution
Accepted by topic author ozie
‎09-25-2015 03:20 AM
Employee
Posts: 1,163
Country: USA

Re: How to filter a contactlist?

The LookupManager class has a ContactLookupNarrow method with several overloads. If you have any trouble with it let me knwo and i can post an example.

Matthew Wood
Act! SDK Support
Community Moderator
Copper Super Contributor
Posts: 112
Country: Australia

Re: How to filter a contactlist?

thanks Matt

 

i was stuck as i did see this function but was confused with the IContactSource return.. but i now see that the IContactSource has a GetContacts to convert back into a ContactList

Employee
Posts: 1,163
Country: USA

Re: How to filter a contactlist?

That's correct, the IContactSource (if I'm remember correctly) is the actual query used to retrieve the contact list. This is required if you want Act to remember you're lookup and be able to go "back" to it using the back button.

Matthew Wood
Act! SDK Support
Community Moderator