cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jasb81
Level 8

Hide Form & button on Runtime

Hi All,

 

How do I hide the Form1 & Next button (btnNextfrm1) on runtime and show them when the New Application button is clicked.

 

 

formhideshow.PNG

 

Thanks

Jag

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Hide Form & button on Runtime

@jasb81 

You could set a variable on your button and use that for the visible property of your form and other button.

 

So, on your "New Application" button, on the OnSelect action, add this:

  UpdateContext({showForm:true})

 

Then on the Visible property of your Form1 and btnNextfrm1 controls, add this formula:

  showForm

 

I hope that helps you out.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

Super User
Super User

Re: Hide Form & button on Runtime

@jasb81 

Same thing...just put the showForm in the formula for the button Visible property.

In fact, you can put that in any visible property on any control you want (on that screen).

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

9 REPLIES 9
Super User
Super User

Re: Hide Form & button on Runtime

@jasb81 

You could set a variable on your button and use that for the visible property of your form and other button.

 

So, on your "New Application" button, on the OnSelect action, add this:

  UpdateContext({showForm:true})

 

Then on the Visible property of your Form1 and btnNextfrm1 controls, add this formula:

  showForm

 

I hope that helps you out.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

Dual Super User
Dual Super User

Re: Hide Form & button on Runtime

Also make sure to set  UpdateContext({showForm:false}) on the OnVisible property of your Screen to ensure the initial load of the screen hides the form until the user clicks the new application button

jasb81
Level 8

Re: Hide Form & button on Runtime

Hi Randy,

 

I tried the recommended solution but did not work. Not sure what I'm doing wrong Smiley Sad

 

Please find below the screenshot

 

hideform.PNG

 

Thanks

Jag

jasb81
Level 8

Re: Hide Form & button on Runtime

Hi Reza,

 

I set UpdateContext({showForm:false}) on the OnVisible property of Screen1 but the Form1 still appears on runtime.  See attached screenshot above.

 

Thanks

Jag

Super User
Super User

Re: Hide Form & button on Runtime

@jasb81 

Did you set the Visible property of your Form1 to showForm?

That would be most important. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
jasb81
Level 8

Re: Hide Form & button on Runtime

That worked. How about the Next button please.

 

Thanks 

Jag

Super User
Super User

Re: Hide Form & button on Runtime

@jasb81 

Same thing...just put the showForm in the formula for the button Visible property.

In fact, you can put that in any visible property on any control you want (on that screen).

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

jasb81
Level 8

Re: Hide Form & button on Runtime

That worked and trying to understand how all this works now.

 

On some of the forums below is a proposed solution and not sure how this works. 

 

You should use a variable as well to define thé Visible Property of your buttons :

 

Screen.OnVisible : UpdateContext({button1Visible:true})

Button1.Visible : button1Visible

Button2.Visible : !button1Visible (meaning the opposite, so false is the variable is true)

Button1.OnSelect : UpdateContext({button1Visible:!button1Visible})

 

Thanks

jag

Super User
Super User

Re: Hide Form & button on Runtime

@jasb81 

Yes, this is all correct.  You can use that variable for any Visible property on any control you want/need.

If you want the control to be visible when your showForm variable is true, then simply put showForm in the Visible property of that control.  If you don't want it visible when your showForm variable is true, then put !showForm in the Visible property...this will take the opposite (not showForm) value.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

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 Solution Authors
Top Kudoed Authors
Users online (5,374)