Getting multi-select option set values in workflows

In this article we will see how to get the values of a multi-select option set attribute within a workflow using the community utility Dynamics-365-Workflow-Tools GetMultiSelectOptionSet:

Sample workflow retrieving multi-select option set values

Before getting into the details, notice I have written another couple of articles to copy multi-select options attributes and update 
multi-select options attributes
in workflows.

In our above example, the workflow “Assign task for regulated Opportunities based on Economic Activities” will check the values of the multi-select option set attribute “Economic Activities” and it will assign a task accordingly.

“Economic Activities” options

This custom workflow activity requires the following input parameters:

  • Source Record URL (required): the URL of the record where the corresponding attribute is located.
  • Attribute Name (required): logical name of the attribute whose values are going to be retrieved.
  • Fail on Exception (optional): 
    this is a secondary attribute which allows you to indicate if the activity will throw an exception if something goes wrong or it will just return the error in an output parameter

Dynamics-365-Workflow-Tools GetMultiSelectOptionSet input parameters

The output parameter Selected Values returns a string with the corresponding results separated by comma. So that you can check them using the contains operator for example.

Selected Values output parameter

If you have found this utility helpful and you want to use it, you just need to install the latest version of Dynamics-365-Workflow-Tools and add the GetMultiSelectOptionSet step into your workflow:

Adding GetMultiSelectOptionSet into our sample workflow

12 thoughts on “Getting multi-select option set values in workflows

  1. Is there any way to get just the labels of the MSOS’s selected values so that they can be included in an email?

  2. Hi, im trying to write a multi-select option data on a textfield, but the string returned by this method are the codes of attribute separater by a comma (only numbers). I need to get the names of the selected attributes.
    is there any way i can change that?

  3. Hi, i needed to write the display values of a multi select option set in a textfield, but the string returned are the codes of the values. Is there anyway i can write the display names?

  4. Same as Marc I can’t select my Multi selection field in the get. What could be wrong is it a language thing (Dutch in our case)

Leave a comment