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

Using If control to reveal a submission button

I am trying to make sure all inputs are filled out before the "New Transaction" button becomes activated.

I have 3 dependancies:

1. NewPayAmount, text input box

2. PaymentType, dropdown box containing:

     A. Blank

     B. Check

     C. Credit Card

     D. Debit Card

     E. Amex

     F. Money Order

3. CheckNumber, text input box

     A. This box is only editable when the "Check" selection is made in the PaymentType dropdown, and functions correctly

 

My formula for the "New Transaction" button DisplayMode is:

If(IsBlank(NewPayAmount.Text)
|| IsBlank(PaymentType.Selected.Value)
|| And(IsMatch(CheckNumber.Text, DisplayMode.Disabled), IsBlank(CheckNumber.Text)),
DisplayMode.Disabled,
DisplayMode.Edit)

This yields all I am looking for, EXCEPT the button becomes active even if the CheckNumber box is empty.

Any thoughts on how to correct?  Thank you!!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: Using If control to reveal a submission button

Hi @Thekeepgames 

 

If(CheckNumber.DisplayMode=DisplayMode.Edit && IsBlank(CheckNumber.Text),Disabled,If(IsBlank(NewPayAmount.Text)
|| IsBlank(PaymentType.Selected.Value),Disabled,Edit))

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Highlighted
Dual Super User
Dual Super User

Re: Using If control to reveal a submission button

Hi @Thekeepgames 

 

If(CheckNumber.DisplayMode=DisplayMode.Edit && IsBlank(CheckNumber.Text),Disabled,If(IsBlank(NewPayAmount.Text)
|| IsBlank(PaymentType.Selected.Value),Disabled,Edit))

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Highlighted
Frequent Visitor

Re: Using If control to reveal a submission button

Fabulous, thank you!  Man, I wasn't even close......

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (10,753)