cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BClouded
Advocate II
Advocate II

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

 

 

 

View solution in original post

BClouded
Advocate II
Advocate II

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
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
Top Kudoed Authors
Users online (3,393)