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

Latest posts