cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
golfnutt82
Super User
Super User

Hide the Submit Button based on Multiple conditions

Hello,
I have two Yes/No fields
I have part of the issue solved where I can show the Submit button if either Yes/No field is true but I am not able to hide the Submit button if both Yes/No fields are true.
I also have a label that shows when both Yes/No fields are true.

In the buttons Visible property I have the following: 

golfnutt82_1-1635269456246.png

I even tried this without success:

golfnutt82_2-1635269926281.png

 

golfnutt82_3-1635270047746.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@golfnutt82 

Also, just re-read - perhaps you are saying you want it hidden if both are true.

If so, then change the formula to:

!(DataCardValue8.Value && DataCardValue9.Value)
_____________________________________________________________________________________
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

5 REPLIES 5
RandyHayes
Super User
Super User

@golfnutt82 

 

Your Visible property is using an OR, meaning that if either one is true, then the control will be visible.  As I understand you, you want it to be visible only if both are true.

Please consider changing your Visible Formula to the following:

DataCardValue8.Value && DataCardValue9.Value

 

You don't need all the redundant true's and false's in the formula or the If statement.  The above will evaluate to either true or false already - which is all that is needed.

 

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!
RandyHayes
Super User
Super User

@golfnutt82 

Also, just re-read - perhaps you are saying you want it hidden if both are true.

If so, then change the formula to:

!(DataCardValue8.Value && DataCardValue9.Value)
_____________________________________________________________________________________
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!

Hi Randy,
This worked.
Thank you again for a learning experience.
Why the !() vs. not using it in your first example? They look to be the same expect for the exclamation point and parens.

RandyHayes
Super User
Super User

@golfnutt82 

The ! is a NOT function.  The parens around it are so that we perform the logical AND and then take the NOT of that.

 

So, breaking the Boolean out.

 

For : DataCardValue8.Value && DataCardValue9.Value

 

DataCardValue8 DataCardValue9 Result (Visible)
false false false
true false false
false true false
true true true

 

For : !(DataCardValue8.Value && DataCardValue9.Value)

 

DataCardValue8 DataCardValue9 Result (Visible)
false false true
true false true
false true true
true true false

 

You can see in the last on, the results are just the logical NOT of the first table.

 

 

_____________________________________________________________________________________
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!

Very awesome!
Thanks again!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (3,813)