cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Symira
Helper II
Helper II

How to read multioptions set from dynamics 365

Hi,

 

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?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Symira 

 

If you happy with the response could you please mark it as accepted solution.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

16 REPLIES 16
DeepakS
Super User
Super User

Hi @Symira 

 

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.

abm
Super User
Super User

Hi,

 

CDS doesn't support  multiselect optionset values yet. You need to get Dynamics connector for this. 

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
abm
Super User
Super User

Hi @Symira 

 

I have a working solution for this. Will update to later this evening.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

Hi DeepakS,

 

The field_value has a comma seperated array of selected options. The field_label is null

Hi,

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

Hi @Symira & @DeepakS 

 

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)

 

image.png

 

Next we need to iterate the values from Sports entity where I have couple of records selected as multi-select under the category field.

 

image.png

 

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.

 

image.png

 

Above expression I used is as follows:

split(outputs('Compose_-_Selected_Multi-Select_Values'),',')

 

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.

image.png

 

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.

 

image.png

 

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.

 

image.png

 

Note: We have overall three loops within each other. Yes too many loops 🙄

 

These are my test run results:

 

image.png

 

 

Hope its all make sense. 

 

If you have any questions related to this please let me know.

 

Thanks

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

Greetings,

 

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, 

"A binary operator with incompatible types was detected. Found operand types 'Edm.Int32' and 'Edm.String' for operator kind 'Equal'."
 
Can you give me nudge in the right direction?
 
I very much appreciate the amount of effort you can committed to this issue.
 
Regards,
 
Capture2.PNGInkedCapture1_LI.jpgCapture3.PNG

Could you please post your List Record Filter?



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

Greetings,

 

Here is my List records - Filter by...

 

Capture4.PNG

abm
Super User
Super User

Hi @fklatecki 

 

Thanks. That mapping looks good to me. Make sure that output is not a string value you are mapping. 

 

Check the run history to identify?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

Can you send me a link for a screenshare?

 

Regards,

 

Frank

Hi @fklatecki 

 

Check your email?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

Greetings,

 

Thank you for the elegant solution, to the MultiSelect Option set "view label" issue.

 

Consider this item solved...

 

Capture5.PNG

abm
Super User
Super User

Hi @Symira 

 

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



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

Hi abm

 

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 🙂

 

regards

Hi @Symira 

 

If you happy with the response could you please mark it as accepted solution.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,100)