cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TTZ
Microsoft
Microsoft

Button Hide and Visible

In my screen, I have 1 video and 2 buttons : "Button A"  & "Button B".
When I clicked and video and it played for 3 mins, Button A would be visible. when the viewer click Button A then Button B become visible?

Click the video--> Video played 3 mins --> Button A visible--> Click Button A --> Button B visible

Is anyone can help to share your insights on it. many thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @TTZ,

 

You could declare two variables for the Onvisible property of the screen. You can use those two variables in the visible properties of the two buttons to either show or hide them. When clicking the video you can use a timer to count till 180 seconds to delay showing the Button A.

 

Below is an example approach. 

 

 

1. Use the following formula in the OnVisible property of your screen:

UpdateContext({ButtonAVisible:false,ButtonBVisible:false})

 

onvisible_screen_updatecontext.png

 

2. In the OnStart of the Video use this formula:

UpdateContext({TimerGo:true})

 

onstart_video.png

 

3. Make sure you set the Duration of the Timer control to 180000 and you use the TimerGo variable for the Start property. Use the following formula for the OnTimerEnd property:

UpdateContext({ButtonAVisible:true})

 

timer_buttonvisible.png

 

4. Make sure you use the ButtonAVisible variable in the Visible property of your ButtonA. In the OnSelect use the following formula:

UpdateContext({ButtonBVisible:true})

 

onselect_buttona.png

 

5. Make sure you use the ButtonBVisible variable in the Visible property of your ButtonB.

 

buttonb.png

 

 

View solution in original post

2 REPLIES 2
Expiscornovus
Super User
Super User

Hi @TTZ,

 

You could declare two variables for the Onvisible property of the screen. You can use those two variables in the visible properties of the two buttons to either show or hide them. When clicking the video you can use a timer to count till 180 seconds to delay showing the Button A.

 

Below is an example approach. 

 

 

1. Use the following formula in the OnVisible property of your screen:

UpdateContext({ButtonAVisible:false,ButtonBVisible:false})

 

onvisible_screen_updatecontext.png

 

2. In the OnStart of the Video use this formula:

UpdateContext({TimerGo:true})

 

onstart_video.png

 

3. Make sure you set the Duration of the Timer control to 180000 and you use the TimerGo variable for the Start property. Use the following formula for the OnTimerEnd property:

UpdateContext({ButtonAVisible:true})

 

timer_buttonvisible.png

 

4. Make sure you use the ButtonAVisible variable in the Visible property of your ButtonA. In the OnSelect use the following formula:

UpdateContext({ButtonBVisible:true})

 

onselect_buttona.png

 

5. Make sure you use the ButtonBVisible variable in the Visible property of your ButtonB.

 

buttonb.png

 

 

View solution in original post

It works, thank you so so so much.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Kudoed Authors
Users online (2,889)