cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

change radio control with timer

Hi there,

 

I'm trying to make an app for a display in a teachers-lounge at my school.

 

The same app is working fine on smarthphone but for the display i want to change a radio-control with a timer.

on the app teachers can click on a radio-controller 1 to 8 so they see the coresponding info for that hour.

 

for the display i want to set a timer so every 5 minutes the screen changes the radio-controller.

so: select 1 - wait 5 min - select 2 - wait 5min - select 3 - etc... after 8 back to 1.

 

Any idea how to make this work?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver I
Resolver I

Re: change radio control with timer

Hi @vanwehaege,

 

How about using a variable to determine the Default property of the radio button and then updating that variable via the timer?

 

Set a variable in your OnVisible property of the screen:

 

Set(varRadioDefault, 1)

 


Set the Default property of your radio control to be the variable - in my case it is varRadioDefault.

 

On your timer, set your Repeat property to true and your Duration to 300,000 (for 5 mins). You can also set AutoStart to true ifyou would like the timer to start when the screen becomes visible. Set the OnTimerEnd property to:

 

If(varRadioDefault < 8, Set(varRadioDefault, varRadioDefault + 1), Set(varRadioDefault, 1))

 

 

You may want to change the variable when someone manually selects a radio button. In this case set a variable in the OnSelect property of the radio control:

Set(varRadioDefault, Radio1.Selected.Value)



Here is an example (with the timer set to 2 seconds):
recording (6).gif 

Hope this helps!

 

Joel

View solution in original post

2 REPLIES 2
Highlighted
Resolver I
Resolver I

Re: change radio control with timer

Hi @vanwehaege,

 

How about using a variable to determine the Default property of the radio button and then updating that variable via the timer?

 

Set a variable in your OnVisible property of the screen:

 

Set(varRadioDefault, 1)

 


Set the Default property of your radio control to be the variable - in my case it is varRadioDefault.

 

On your timer, set your Repeat property to true and your Duration to 300,000 (for 5 mins). You can also set AutoStart to true ifyou would like the timer to start when the screen becomes visible. Set the OnTimerEnd property to:

 

If(varRadioDefault < 8, Set(varRadioDefault, varRadioDefault + 1), Set(varRadioDefault, 1))

 

 

You may want to change the variable when someone manually selects a radio button. In this case set a variable in the OnSelect property of the radio control:

Set(varRadioDefault, Radio1.Selected.Value)



Here is an example (with the timer set to 2 seconds):
recording (6).gif 

Hope this helps!

 

Joel

View solution in original post

Highlighted
Regular Visitor

Re: change radio control with timer

This works perfectly!! super work thx.

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,412)