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:
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.
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
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.
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:
Is there any way to get just the labels of the MSOS’s selected values so that they can be included in an email?
I can’t see the custom created multi option set in the workflow get.
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?
Hi. We’re trying to do the same. Did you manage to figure it out?
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?
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)
This would be even more awesome if there was a way to get the labels also!
Hi everyone, thanks for your comments! Based on your feedback, I have extended the utility to provide the labels of the items as well. I have written this article where you can find more information: https://ramontebar.net/2020/12/22/get-choices-names-in-workflows/
This is a grreat blog