Community
Showing results for 
Search instead for 
Do you mean 
Reply

ApplicationState.currentContactList

Loyal Listener
Posts: 69
Country: United States

ApplicationState.currentContactList

when I call:

 

Dim cl as contact list

 

cl= app.ApplicationState.CurrentContactList

 

The order of the contacts as I iterate through them isn't the same as what's displayed on the screen. (Neither are CurrentCompanyList and CurrentGroupList apparently)  Is there anyway to get them in the same sort order?

 

TIA

 

Mike Fortier

Fortier Consulting, LLC

mike@fortierconsulting.com

Nickel Elite Contributor
Posts: 508
Country: USA

Re: ApplicationState.currentContactList

So, I think there are two things going on here.  First, at least on my v11 ACT, the Contact List is default sorted by Company (i.e. when I first click on the Contact List icon).

 

Second, programatically, you could use the sort method:

 

Public Sub Sort(ByVal sortCriteria() As Act.Shared.Collections.SortCriteria)

Member of Act.Shared.Collections.DataList(Of T)

 

and sort by Company - wouldn't that do it?

 

Richard Brust
ACT! Certified Consultant
richard@rbrDataSolutions.com
Loyal Listener
Posts: 69
Country: United States

Re: ApplicationState.currentContactList

Yeah, I can sort it myself, but I'm more interested in getting the current sort order of the current Contact/Company/Group list, however the user has it currently sorted. 
Bronze Elite Contributor
Posts: 2,115
Country: United_Kingdom

Re: ApplicationState.currentContactList

Hi Mike,

 

the ContactList object has a get member SortCriteria which returns an array of the current ContactList's SortCriteria. 

 

SortCriteria[] sCArray = cl.SortCriteria;

foreach(SortCriteria sC in sCArray)

{

MessageBox.Show(sC.Property.Name);

}

 

HTH

Vivek 

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog