Best of Support

Creating a list from contacts in Amicus Assembly

Issue

I know how to create a list of contacts of a certain type on a file (e.g. Plaintiffs, Defendants), but is there a way of creating a general list that shows all the contacts on a file AND what party type they belong to?

Solution

Good question!  This is a slightly more "tricky" requirement in that the name of the party is from the Contact object, while the PartyType is from the Party object itself.  For this reason, you cannot use a ForEachBlock — as this allows you to iterate over only one object at a time.

 

 Anyway the following should do it:

 

%[Parties = AA.SelectedMatters[1].Parties]

%[MyList=Lists.New()]

 

%[i=1]

%[repeatblockwhile(i <= Parties.Count)]

 

%[ListDescription = Parties[i].contact.FullName &" - " &Parties[i].Partytype]

%[MyList.Add(ListDescription, ListDescription)]

 

%[i=i+1]%[EndBlock]

 

%[MyList.SaveAs("\My App", "My List")]