cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Thekeepgames
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
RezaDorrani
Dual Super User
Dual Super User

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
RezaDorrani
Dual Super User
Dual Super User

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.

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

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,436)