I have quite a straightforward requirement. I have an entity in dynamics 365 with a multioptions set field. I need to write data to an external datatable using flow, and need to write the lables of the selected options. Unfortunately I get an empty lable here.
Can someone guide me how I can get the selected lables?
Solved! Go to Solution.
When you run List Records action and are you getting the selected option lables with value in response? please share the output if possible?
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
In fact I am already using Dynamics connector. In spite of that the field_value provides me a comma seperated array of values of selected fields, the field_lable is null
Dynamics connector returns the multi-select option label as null but the selected values will be retrieved as comma separated values. CDS connector don't return any values or label.
Here I will explain how to retrieve the labels from multi-select option set.
My entity name is called Sports and I have got a multi-select field called Category.
Here I am have a manual trigger and next step is the list records (Dynamics Connector)
Next we need to iterate the values from Sports entity where I have couple of records selected as multi-select under the category field.
Above I have used a compose to get the selected multi-select value from each record. Remember these are comma separated values. So in my next step I have used a split expression to split each selected option select values.
Above expression I used is as follows:
So the split is going to give us multi values as an array. So again we need to use another loop to iterate the values. Remember the below loop is within the loop we have declared above.
Above compose will give us each selected values. This is a numeric value.
To get the label text using the above option set numeric value we need to use the "String Maps" entity using the filter query as entity name (ajb_sport) and attributevalue equal to numeric value of multi-select option set value.
Because it's a list we need another For Each Loop (Again within the earlier for each loop) to iterate the values of the text.
Note: We have overall three loops within each other. Yes too many loops 🙄
These are my test run results:
Hope its all make sense.
If you have any questions related to this please let me know.
I have been following along with your reply, as I too, am looking for labels not values from a multi-select option set in Dynamics 365.
However, I am getting this error,
Did you looked into this solution? Try this and let me know how it goes. If all good then please mark it as solution accepted as it will help others in community.
Thanks for your detailed reply. This works absolutely fine. The entity "String Maps" as the missing part in the puzzle for me. The solution works fine. At the same time, I feel this workaround would not be necessary if Microsoft would fix this bug. Are you aware if this bug has been reported to Microsoft.
Thanks to you any ways for helping fix this issue for now and for future 🙂
Check out the News & Announcements to learn more.
Participate in the Power Virtual Agents Community Challenge
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.