cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
leslie_rivera
Helper V
Helper V

PowerApps: Hide button if text field is blank

I want to hide a button that navigates to a different screen if text boxes are left blank. Cannot make them required because I just need either one of them to be filled out.

 

One is a check box and the other is a text field that someone can enter data. So the person can either click on the checkbox or enter custom data in the text field. I dont want them to be able to just go passed it and click on the next page.. makes sense?

 

This is the custom text box

leslie_rivera_0-1608353475188.png

 

This is the checkbox card

leslie_rivera_0-1608353859533.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Gopala_Krishna
Solution Sage
Solution Sage

@leslie_rivera 

 

You can make use of PowerApps function and variables to achieve the desired scenario.

 

--> Select the check box control present in the form(don't select on summary form, select directly internet main checkbox) select that checkbox and enter the below formula on the Oncheck and Onuncheck properties of the check box

--> Set(vis,true) - OnCheck & Set(vis,false) - OnUncheck. The point why we are not using the default mentioned formula is that, when we do IsEmtpy or Isblank it concentrate's on the text part of the control and check's that that specific field has some value or not

--> As we cannot operate Checkboxes with out any pretext, that's why we are using variable for storing the response. 

--> After the variable declaration configure the below formula on the button

vis Or !IsBlank(TextInput1.Text)

--> the formula helps in controlling visibility and also enable behavior to enable only if one of two controls is connected.

 

If the information shared helps you, please consider giving a thumbs up 👍 and mark solution as resolved.

 

View solution in original post

2 REPLIES 2
Gopala_Krishna
Solution Sage
Solution Sage

@leslie_rivera 

 

You can make use of PowerApps function and variables to achieve the desired scenario.

 

--> Select the check box control present in the form(don't select on summary form, select directly internet main checkbox) select that checkbox and enter the below formula on the Oncheck and Onuncheck properties of the check box

--> Set(vis,true) - OnCheck & Set(vis,false) - OnUncheck. The point why we are not using the default mentioned formula is that, when we do IsEmtpy or Isblank it concentrate's on the text part of the control and check's that that specific field has some value or not

--> As we cannot operate Checkboxes with out any pretext, that's why we are using variable for storing the response. 

--> After the variable declaration configure the below formula on the button

vis Or !IsBlank(TextInput1.Text)

--> the formula helps in controlling visibility and also enable behavior to enable only if one of two controls is connected.

 

If the information shared helps you, please consider giving a thumbs up 👍 and mark solution as resolved.

 

Thank you!

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

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

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,602)