web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Translation Toggle on ...
Power Apps
Unanswered

Translation Toggle on Dependent Dropdown

(0) ShareShare
ReportReport
Posted on by 93

Hello my fellow Power Rangers. If someone can figure this out, you will be my Power Hero.

In a nutshell: looking to get dependent dropdown and translation toggle functionality all in one.

 

My dataverse has two important tables....

 

TABLE 1: FruitClassificationTable

This table has 4 relevant columns. The table will provide values for the dropdowns in the app. I mimicked what the table looks like in Excel below:

 

nmasmo_0-1688067886997.png

 

[fruit_family]: General family of fruits. For example, oranges and grapefruits belong to the citrus family.

[fruit_english]: A specific fruit. For example, an orange is a specific fruit in the citrus family.

[fruit_spanish]: The Spanish translation of the specific fruit in the [fruit_english] column.

[fruit_code]: The unique code identifying a specific fruit.

 

TABLE 2: PurchasedFruitTable

This table has 1 relevant column. Every time someone purchases a fruit, the fruit_code goes into the [purchased_fruit] column and the table grows by one row. I mimicked what it could end up looking like using Excel below:

nmasmo_1-1688067902926.png

 

 

This is what the app looks like:

nmasmo_2-1688067902928.png

It's kind of hard to see, but basically the top left is a toggle that should allow the end user to toggle the dropdown on the right between English and Spanish. The left dropdown is the Fruit Family dropdown, and the right dropdown is the Specific Fruit dropdown.

 

 

There are three requirements that must be satisfied…

 

1) Specific Fruit dropdown needs to be dependent on the Fruit Family dropdown. For example, if I click on “berry” in the Fruit Family dropdown, only specific fruits that belong to the berry family should appear in the Specific Fruit dropdown. This would be a dependent dropdown.

 

nmasmo_3-1688067902930.png

 

2) When the end user clicks the “Click Me to Translate to Spanish” toggle, the Specific Fruit dropdown should switch to the Spanish translations.

 

nmasmo_4-1688067902938.png

 

3) When the end user clicks the “Submit to PurchasedFruitTable” button, the fruit_code corresponding to the specific fruit that was selected must be written to the PurchasedFruitTable in the dataverse.

 

The important thing is that, regardless of whether the dependent dropdown is being displayed in English or Spanish, the fruit_code is what is written to the PurchasedFruitTable. That way we don’t end up with a PurchasedFruitTable that looks like this:

nmasmo_5-1688067902939.png

 

… because that would be too difficult from a data analysis perspective.

There is plenty of online content about building a dependent dropdown in Power Apps, but to build a dropdown that is both dependent and translatable via a toggle button is turning out to be quite the challenge!

Any help appreciated (:

Thank you!

Categories:
  • Scott_Parker Profile Picture
    1,090 on at

    Use a Combobox, not a dropdown. A Combobox will let you conditionally change the DisplayFields property to change the value that is shown. Something like:

    cboSpecificFruit.Items = Filter(FruitClassificiationTable, fruit_family = drpFruitFamily.Selected.Value))
    
    cboSpecificFruit.DisplayFields = If(tglLanguage.Value, ["fruit_english"], ["fruit_spanish"])

    When you're retrieving the values from the ComboBox to submit, get cboSpecificFruit.SelectedItem.fruit_code so you patch in the code like you want.

     

    The toggle doesn't immediately update the comboboxes' DisplayFields from what I was seeing. You could consider having the toggle OnChange call Reset() on the comboboxes so that the display values update.

  • nmasmo Profile Picture
    93 on at

    Hey @Scott_Parker !

    Something strange is happening when I use the ComboBox…

    When I have the toggle set to English, the Specific Fruits are in English, as expected…

    nmasmo_0-1688148963939.png

     

     

    But when I set the toggle to Spanish, all I see is blank values…

    nmasmo_1-1688148963949.png

     

    This is my code for DisplayFields on the combo box:

    DisplayFields = If(Not(TranslationToggle.Value), ["cr4c1_fruit_english"], ["cr4c1_fruit_spanish"])

    nmasmo_2-1688148963953.png

     

    This is my code for Items on the combo box:

    Items = Filter(fruits, fruit_family = FruitFamilyDropdown.Selected.Value)

     

     

    I know that "cr4c1_fruit_spanish" is the correct column in my dataverse table and that it is correctly spelled…

    nmasmo_3-1688148963963.png

     

    … and there are no blank values in my fruit_spanish column.

    Any ideas?

  • Scott_Parker Profile Picture
    1,090 on at

    I'm not familiar with Dataverse tables, so to me it seems odd that you are having to include a prefix at all. The Intellisense on cboFruits.Selected.[some field] would help you confirm if [some field] exists with the name you expect.

     

    Normally, the ComboBox control will prevent the entry of an unknown field in the DisplayFields property. But, since we have a more complex formula there now, this safety feature won't be active. If a field matching the provided name isn't present in the items, then you will see a blank.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard