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

 

 

It works, thank you so so so much.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,736)