cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Friendly
Level: Powered On

Show/Hide Button based if 4 fields are blank, have working formula for 3

How do I show / hide the visibility of my submit button based on 4 fields containing anydata (i.e. IsBlank)? 

I have this working with 3 fields but cannot figure out 4.  Thank you in advance!  Here is my working formula with 3.


If(And(!IsBlank(DataCardValue24.Text), !IsBlank(DataCardValue25.Text)), !IsBlank(DataCardValue26.Text), true, false)

 

The 4th field would be named DataCardValue27.Text

Example picture:

powerapps question.PNG


1 ACCEPTED SOLUTION

Accepted Solutions
Edwin-Abdalian
Level 10

Re: Show/Hide Button based if 4 fields are blank, have working formula for 3

I tested your formula in my environment and it works with no issues, the button is displayed according to the logic and when all of the textboxes have value. you are using And and all the conditions should be satisfied.

If(And(!IsBlank(DataCardValue1.Text), !IsBlank(DataCardValue2.Text),!IsBlank(DataCardValue3.Text), !IsBlank(DataCardValue4.Text)),true,false)

 

verify the Default value of your datacards, is there any value or even a space in any of them?

View solution in original post

6 REPLIES 6
Edwin-Abdalian
Level 10

Re: Show/Hide Button based if 4 fields are blank, have working formula for 3

could you send the formula that includes DataCardValue27.Textdo you get an error or it doesn't work?

Friendly
Level: Powered On

Re: Show/Hide Button based if 4 fields are blank, have working formula for 3

It doesn't error, infact it bugs out the form (or at least can be exploited).

 

If(And(!IsBlank(DataCardValue24.Text), !IsBlank(DataCardValue25.Text)), !IsBlank(DataCardValue27.Text), !IsBlank(DataCardValue26.Text), true, false)

 

What actually happens is, that if 2/4 or 3/4 conditions are met, the submit button shows.  Instead I want all 4 conditions to be met.  Example of what occurs below;

 

submit_button1.PNGsubmit_button2.PNGsubmit_button3.PNGsubmit_button4.PNG

Edwin-Abdalian
Level 10

Re: Show/Hide Button based if 4 fields are blank, have working formula for 3

I tested your formula in my environment and it works with no issues, the button is displayed according to the logic and when all of the textboxes have value. you are using And and all the conditions should be satisfied.

If(And(!IsBlank(DataCardValue1.Text), !IsBlank(DataCardValue2.Text),!IsBlank(DataCardValue3.Text), !IsBlank(DataCardValue4.Text)),true,false)

 

verify the Default value of your datacards, is there any value or even a space in any of them?

View solution in original post

Friendly
Level: Powered On

Re: Show/Hide Button based if 4 fields are blank, have working formula for 3

I had my freaking bracket in the wrong spot:

 

If(And(!IsBlank(DataCardValue24.Text), !IsBlank(DataCardValue25.Text), !IsBlank(DataCardValue27.Text), !IsBlank(DataCardValue26.Text)), true, false)

 

therefore I wasn't capturing all the parameters of my formula.

 

Thank you Edwin, your solution worked 🙂 

Edwin-Abdalian
Level 10

Re: Show/Hide Button based if 4 fields are blank, have working formula for 3

good catch. Yes, all those parentheses can make the formula complicated. I always use the Format Text option in the expression bar, it makes it easy to read and troubleshoot it.

 

--------------------------------------------------------------------

If this post helps, please choose Accept As Solution to help the other members, and give me a Thumbs Up.

Friendly
Level: Powered On

Re: Show/Hide Button based if 4 fields are blank, have working formula for 3

You've absolutely made my day Edwin - thank you so much!

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (3,841)