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

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
Helper III
Helper III

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
PA 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

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,155)