It is possible to configure an instance of ContactListXML or CSV to provide the pick options displayed by a MultipleChoice / MultipleSelect question in a Survey. You can then filter down the TO address of a DeliveryByEMail to match what was selected.

The gist of the matter is to use a custom email transform to reach back into the xml source and extract the EMail that corresponds to the item that was selected by the question.

Since we do not want to override or customize SchemaDeliveryByEMail, we use the embedded <agtransform> field directly within the instance of the delivery option. This transform must:

  • wire back to the xml source via the xsl document construct
  • access the user input for the question answers to see which item was selected

This custom transform processing can then override the TO address by matching the user response to a particular question back into the XML, and then extracting the EMail field from the corresponding item.

@see SchemaConactListXML for a a complete example that provides a list of States, and then emails back to the contact associated with the selected state.

@see SchemaCSV for a complete example that provides a list of options based on the first column in every row, and then emails back to the second column of the selected row.