Best of Support

Populating a list on-the-fly from Amicus Assembly parties

Issue

In Amicus Assembly, People on this file, I may have 1 to 5 lenders (party type: lender).

 

In my Dialog, I would like to have a field (called SelectLenderName) with a drop-down List listing all lender names. If there is only one lender, that lender name would be displayed in the box. If there is more than one lender, all the lender names would be displayed in the drop-down List and users can select one of them.

 

How do I  populate the drop-down List on-the-fly?

Solution:

  1. In your Dialog, create the "SelectLenderName" field as a drop-down List. Point this field to a List stored in the "Default" Application called, for example, "Lender List".  Start off by making this List just a blank dummy List.  The reason for storing it in "Default", is that it will be updated and changed all the time depending on the matter which the user is referencing - and each user's default Application is typically stored on their own hard drive location.

 

  1. In the Onload Event of the Dialog form, insert the following script:

%[MyList=Lists.New()]

%[ForEachBlock("PartyContact",

AA.SelectedMatters[1].PartiesOfType("Lender").Contacts)]

%[MyList.Add(PartyContact.FullName, PartyContact.FullName)]

%[EndBlock]

%[MyList.SaveAs("Default", "Lender List")]

%[Iftrue(MyList.count=1, thisdialog.selectlendername=mylist.item(1))]

 

Daniel Todes