cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BClouded
Helper IV
Helper IV

Conditionally changing the value of a dropdownbox

Hi Community
I have a SP-list with Title and TitleFR (Fr for French).
I'm building a multilingual app. If it's french, I want my dropdownboxes showing me the TitleFr column instead of Title column.
In the properties of the dropdown I can see the value, but there is no way in making this coditional. This attribute is not available in the picklist on the left side. 

Do I really have to make a second dropdown box and hide/show this based on that condition?
Or am I overlooking an option here?

Thanks!
Bart

BClouded_0-1616759692501.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Alex_Security
Resolver I
Resolver I

Hi Bart,

 

so this can be dynamic, it just has to go a bit around the houses to get there!

 

so we'll start by making a gallery with a single label set to thisitem.value. (this can be hidden by setting visible to false!) but in that gallery your items will be the list, however (assuming your language is controlled by a slider) we'll use a variable and an if statement to work out the items. you can use a function like the below:

 

If(
LanguageVariable = true,
YourSharepointList.title,
YourSharepointList.titleFR
)

 

this then pivots the items of the gallery through that variable, and you simply need to set the slider oncheck/onUncheck to set the variable to true/false respectively.

 

Next, Set your Dropdown Items to the gallery you created.Allitems and you'll be ready to go 🙂

 

hopefully this solves your problem, if it does, feel free to mark it as a solution! some example pictures below:

Alex_Security_0-1616761120806.png

Alex_Security_1-1616761135497.png

 

 

 

View solution in original post

3 REPLIES 3
Alex_Security
Resolver I
Resolver I

Hi Bart,

 

so this can be dynamic, it just has to go a bit around the houses to get there!

 

so we'll start by making a gallery with a single label set to thisitem.value. (this can be hidden by setting visible to false!) but in that gallery your items will be the list, however (assuming your language is controlled by a slider) we'll use a variable and an if statement to work out the items. you can use a function like the below:

 

If(
LanguageVariable = true,
YourSharepointList.title,
YourSharepointList.titleFR
)

 

this then pivots the items of the gallery through that variable, and you simply need to set the slider oncheck/onUncheck to set the variable to true/false respectively.

 

Next, Set your Dropdown Items to the gallery you created.Allitems and you'll be ready to go 🙂

 

hopefully this solves your problem, if it does, feel free to mark it as a solution! some example pictures below:

Alex_Security_0-1616761120806.png

Alex_Security_1-1616761135497.png

 

 

 

BClouded
Helper IV
Helper IV

Thanks Alex, this is indeed a good workaround. 
Since I have 15 dropdowns and I was looking for a solution to reduce my controls.  🙂
There are is also a patch onChange, and a calculation happening depending on the value selected in those dropdowns. 
But you brought me on a good thinking track, maybe I can make a collection, and load the Title or TitleFr in it depending on the toggle value for the language! 
I guess that will do the trick!


Hi @BClouded glad I could help, even if just changing the line of thought! feel free to mark it as a solution if you feel it solves your problem!

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,931)