cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MTrummer
Frequent Visitor

Get OptionSet value in different language

Within a flow I want to get the label text from an OptionSet.

I've found following ressource which describes how to use the CDS connector to get the text: https://linnzawwin.blogspot.com/2020/07/get-lookup-display-name-and-option-set.html

 

I get the label always in English language - even though I changed settings to German - see this hint https://powerusers.microsoft.com/t5/Using-Flows/How-to-change-language/td-p/755573.

 

Any idea how to get the label from an OptionSet in a different language using CDS connector?

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User II
Super User II

Hi @MTrummer,

 

Are you using the Translation feature of Dynamics? If not, you could translate the options set labels for those other languages as a workaround. This is a short YouTube video about that process:

How to Add Translations for Custom Fields and Entities in CRM 2013

 

When the translations are imported and published you should be able to choose that other language also for the account used for the flow connections.

Be aware, everything for that account will be translated into German.

 

personalizationsettings.png

 

The custom options set labels should now also be presented in the different language for that specific user (in this case German).

translations.png

 

When you retrieve the data within a Power Automate flow with that same user account it should also retrieve the German labels.

germanflowaccount.png

View solution in original post

5 REPLIES 5
ViditGholam
Responsive Resident
Responsive Resident

Hi @MTrummer you can try this instead this is how I do it 

I have an Option set with values as below 

ViditGholam_0-1617812831420.png

Now Check my flow and see the magic 

so what I did here is I created a json of the option set values and the corresponding label as as shown in the below flow 

ViditGholam_1-1617813010317.png

Step - 1 Create json as below with your values and labels

ViditGholam_4-1617813276255.png

Step -2 Create a string variable and set its value to your option set value from dynamic contents.

Step - 3 Use the below expressions in the place where you want the label value to appear

ViditGholam_5-1617813387779.png

 

Output - 

ViditGholam_2-1617813194057.png

ViditGholam_3-1617813217814.png

Hope that helps ! 

Let me know incase any issues.

If this resolves your issue please mark this post as answered and hit me a thumps up.

Thanks and Regards,

 Vidit

 

Thank you for this idea.

I understand your approach - but that means I'd need to maintain the labels in two places (D365 CRM and Power Automate). As I do have a lot of OptionSets this is not really an option and error prone in worst case.

 

I can't believe that this is supposed by Microsoft to be done this way.

And the requirement does not seem to be very special - does it?

ViditGholam
Responsive Resident
Responsive Resident

Yeah @MTrummer I do agree to what you said.

Expiscornovus
Super User II
Super User II

Hi @MTrummer,

 

Are you using the Translation feature of Dynamics? If not, you could translate the options set labels for those other languages as a workaround. This is a short YouTube video about that process:

How to Add Translations for Custom Fields and Entities in CRM 2013

 

When the translations are imported and published you should be able to choose that other language also for the account used for the flow connections.

Be aware, everything for that account will be translated into German.

 

personalizationsettings.png

 

The custom options set labels should now also be presented in the different language for that specific user (in this case German).

translations.png

 

When you retrieve the data within a Power Automate flow with that same user account it should also retrieve the German labels.

germanflowaccount.png

View solution in original post

Thank you - that does the trick!

For whatever reason that did not come to my mind at all.

 

(still it seems to me more robust if I could set the language within my flow itself)

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (29,386)