cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lynnosler
Frequent Visitor

DataCard Visibility using multiple datatype actions

I have an app with where I need to show/hide visibility based on 2 toggles and a dropdown box value.  Currently, I have not been able to accomplish this successfully.  Conditions are: if both toggles are true AND if the dropdown selection is "IPhone" show else hide.  I have another datacard that will need similar criteria, only the dropdown selection will be "IPhone" OR "Standard".  What concept am I missing here?  Please?

 

Dropdown Choices are:

 

None

Standard Phone

IPhone

 

 

 

If(ImmediateActionComplete_Toggle.Value= true ,If(HadEmailDataCard.Value= true ,If(!IsBlank(LookUp(HasPCTextBox.SelectedItems,Text(Value)="IPhone")), true , false ), true ))

 

Previous Attempt

 

If(ImmediateActionComplete_Toggle.Value=true, If(HadEmailDataCard.Value = true, If(HasPCTextBox.Selected.Value = "IPhone", false, true), true))

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@lynnosler 

I am assuming you have set HasPCTextBox as a multi-select combobox.

If so, your Visible property should be the following:

ImmediateActionComplete_Toggle.Value && HadEmailDataCard.Value && "IPhone" in HasPCTextBox.SelectedItems.Value

 

For the other one:

ImmediateActionComplete_Toggle.Value && HadEmailDataCard.Value && 
("IPhone" in HasPCTextBox.SelectedItems.Value || "Standard" in HasPCTextBox.SelectedItems.Value)

 

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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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

3 REPLIES 3
RandyHayes
Super User
Super User

@lynnosler 

I am assuming you have set HasPCTextBox as a multi-select combobox.

If so, your Visible property should be the following:

ImmediateActionComplete_Toggle.Value && HadEmailDataCard.Value && "IPhone" in HasPCTextBox.SelectedItems.Value

 

For the other one:

ImmediateActionComplete_Toggle.Value && HadEmailDataCard.Value && 
("IPhone" in HasPCTextBox.SelectedItems.Value || "Standard" in HasPCTextBox.SelectedItems.Value)

 

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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

does true, false need to be in that expression?

RandyHayes
Super User
Super User

@lynnosler 

No, not at all.  It is redundant. 

 

The formula provided will evaluate to either true or false.  Using that in an If to determine true or false is the same as : If(true, true, false)  - it is redundant because the bolded true is already true and it is not false.

Same with Not -  If(true, false, true) is redundant because !true is false and not true.

 

 

 

_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (4,678)