cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Stuznet
Helper I
Helper I

Visible Conditional

Hi guys,

I'm struggling with simple logic. I have 1 dropdown and the other is a combo box.

 

Dropdown

Item: ["Dropdown1", "Dropdown2"]

 

Combobox

Item: ["Combo1", "Combo2"]

 

Toggle - using this to check if the logic below matches based on the selection. If it matches then it'll change to true.

Default: 

If(Dropdown1.Selected.Value = "Dropdown1" && "Combo1" in ComboBox1.Selected.Value, true, false)

Toggle Result: 

Stuznet_0-1629924134517.png

 

If I selected Combo1 first then Combo2 second, the toggle will turn off which is correct because it doesn't match the logic.

Stuznet_1-1629924242853.png

But if I select Combo2 first then Combo1 second, the toggle will turn on

Stuznet_2-1629924286186.png

 

What am I doing wrong here? 

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
RandyHayes
Super User
Super User

@Stuznet 

You are looking at a single record - SelectedItem

What you want is SelectedItems.  So, change your Default formula to the following:

 

Dropdown1.Selected.Value = "Dropdown1" && "Combo1" in ComboBox1.SelectedItems.Value

 

The If and the true false part is redundant, you can exclude all of that.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

WarrenBelz
Super User
Super User

*** EDIT *** @RandyHayes already has it  - please mark his solution as correct.

Hi @Stuznet ,

Put this on the Default

Dropdown1.Selected.Value = "Dropdown1" && "Combo1" in ComboBox1.SelectedItems

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

3 REPLIES 3
RandyHayes
Super User
Super User

@Stuznet 

You are looking at a single record - SelectedItem

What you want is SelectedItems.  So, change your Default formula to the following:

 

Dropdown1.Selected.Value = "Dropdown1" && "Combo1" in ComboBox1.SelectedItems.Value

 

The If and the true false part is redundant, you can exclude all of that.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
WarrenBelz
Super User
Super User

*** EDIT *** @RandyHayes already has it  - please mark his solution as correct.

Hi @Stuznet ,

Put this on the Default

Dropdown1.Selected.Value = "Dropdown1" && "Combo1" in ComboBox1.SelectedItems

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

RandyHayes
Super User
Super User

@WarrenBelz 

Thanks Warren, glad you replied so I looked at my post again...I had mentioned the Visible property and not the Default property...I've corrected. 

(Hope you're doing well)

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,395)