Updating multi-select values

One frequently-asked question in the context of multi-select picklists is how to update a particular multi-select picklist of a selected range of records to add a particular value to that field for all those records. For example, suppose you have a multi-select picklist named Contact Type in your Contact object, and the allowed values of the picklist are ParentVolunteerTop Donor and Little League Supporter. Suppose now that you wish to update a selected set of Contact records to add the Top Donor value to each record, without changing the other values in the field, i.e., if a Contact has the Volunteer value checked, it must remain checked after the update operation.

Ordinarily, an import or mass-update via Apsona would destroy the contents of the field and replace it with just the single value you provide. Here, however, we show a technique for achieving the desired effect of retaining the existing values in the picklist and adding the new value. This description assumes that you are familiar with Apsona’s data import tool.

In this simple example, we will assume that there is a field named Color liking in the Contact object that indicates the colors that the person likes. Let us suppose that we wish to add the color Red to this field for each of the selected contacts. The basic idea of the process is to append the string ;Red to string representation of each field, and then update the field via Import/Update. Note that we need the semicolon character at the left end of the added text, since the choices of a multi-select field are separated by semicolons.

  1. Find the records you wish to update, using the appropriate filter conditions, and export the record ID and the multi-select field of each record in CSV form via Tools – Export. Including the record ID field (in this case, the Contact ID) in the export enables us to update the selected records via that field.In the common situation where you have an existing CSV file containing some fields of the record, e.g., the contact names or their email addresses, you can simply paste the entire column of names (or email addresses) into the filter box, since Apsona recognizes line breaks as separators, as described in the filtering documentation.
  2. Start up the import tool via Tools – Import/Update. Select the “Update existing records” option, and select the record ID field for the “Lookup by” choice. Paste the CSV data into the box.
  3. Click the Next button so that Step 2 of the import wizard appears.
  4. Click Actions – Add column.
  5. In the resulting popup, select the “Color liking” choice for the Field dropdown, indicating that we are preparing a new column for the Color liking field. Check the “Replace column name references” box, and then click the “Color liking” column. This will cause the text string {!Color liking} to appear in the Value box. Type in the text ;Red to the end of the Value box. Click Ok.
  6. You will now have two Color liking columns, the first of which is the original data, and the second contains the updated data with the new choice. Set the “Import to field” choice of the first column to “Do not import”, so that the second, newly-added column will be used to update the field for the selected contact records.
  7. Click Next, and finish the import process. You will now have added the color Red to the Color liking field of all the selected records.

Powered by BetterDocs