Get choices names in workflows

A couple of years ago I wrote a utility for the community tool Dynamics-365-Workflow-Tools to retrieve the selected values of a multi-select optionset attribute within a workflow. I have now extended this utility to also provide the corresponding labels.

By the way, by multi-select optionset I mean the Choices column type based on the new Microsoft naming convention.

In the first article, I described how to use the activity GetMultiSelectOptionSet. Now you will find the new input parameterRetrieve Options Names“. When this input parameter is set to true (by default is false), the new output parameterSelected Names” will return a string with the labels of the selected items.

New input parameter “Retrieve Options Names”

Once the activity has been executed, you should find the returned labels in the property Selected Names:

New output parameter “Selected Names”

Here is an example where I got a Car entity with a Colors attribute. When this attribute changes, the selected items are captured by the workflow “Show car colors names”. The selected values are populated in the Colors Values attribute and the selected labels are stored into the Colors Names attribute.

I submitted a new pull request into the main project to merge this new feature. @demianrasko has already reviewed it and you can start using it as part of the latest release and onwards.

If you have any question about this new feature, please send me a message on LinkedIn and I’ll review it with you.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s