In my previous post, I described how you could retrieve the labels of a choices column (multi-select optionset attribute) using a classic Dynamics Workflow. In this new article, I describe how to do the same using a Power Automate flow.
Using a classic Dynamic workflow is still a valid solution. However, if you are creating an asynchronous process, classic workflows are not recommended any more:
So a Power Automate flow is the way to go if your solution can run asynchronously.
My initial thoughs were: “ok, so I can create some kind of extension in Power Automate to retrieve those labels as I was doing with the GetMultiSelectOptionSet custom workflow activity for classic workflows”. This extension could have been a process action or one of the new Custom API function. However, before jumping into the code, I decided to run some tests and I realised that no development was required 😏
Using the latest recommended CDS connector (Common Data Service (current environment)), you can now retrieve the labels for Choice or Choices columns (optionset or multi-select optionsets). You just need to follow these steps:
- Use the action Get a record to retrieve the labels. Triggers currently do NOT provide the labels.
2. Apply an expression such as “outputs(‘NAME_OF_PREVIOUS_STEP_GET_RECORD’)?[‘body/COLUMN_NAME@OData.Community.Display.V1.FormattedValue‘]
In this simple test case, I got a Car and related Car Review tables. When the car is created or changes, a new car review is created with the colors information.