By using the onchange command on a picklist field along with a text or memo field, you can easily create the ability to capture multiple picklist values for situations where one value is not sufficient. For example, you may have a list of Account types and want to identify some Accounts as both customers and partners.
To do this, we create a picklist of the values and then write java script behind the picklist to concatenate selected values to the memo field. Our memo field will become the list of the multiple values we have selected from the picklist. Lets’ look at an example where we want to simulate a list of Contact categories like we might use in Microsoft Outlook.
First, we’ll create a memo field called Categories (CFMCategories). Then we’ll create a picklist field called CategoryList (CFMCategorylist). We then add our values to the picklist. Next, we edit the onchange function from the ‘events’ tab under the field ‘properties’ window and add the java script (shown below) that adds the selected value of the picklist to the memo field each time a value is selected.
var strCategories;var strCategoryList;
With our fields and java script in place, each time we make a selection from the picklist field ‘CategoryList’, that selection is added into the memo field labeled ‘Categories’.