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 III
Super User III

@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.
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 III
Super User III

@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.
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

does true, false need to be in that expression?

RandyHayes
Super User III
Super User III

@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.
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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

Users online (3,144)