web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

Timer set to zero

(0) ShareShare
ReportReport
Posted on by 2

I have a main page with button that clicks through to a sub-page.

 

The sub-page has a Form on it. The sub-page stays open until the form is submitted, then a Timer starts for 30 seconds. OnTimerEnd the timer navigates back to the main page.

 

If the user enters the form again during those 30 seconds I need the Timer to reset back to the beginning, so the user gets another 30 seconds on the sub-page.

 

I've tried a number of things but cannot get the timer to reset back to zero. At the moment for the Form submission I check OnSuccess:

 

UpdateContext({StartTimer3: false});

Timer3.Value=0;

UpdateContext({StartTimer3: true});

ResetForm(Form1)

 

(Timer3 Data is set to StartTimer3)

 

The initial form submission correctly starts the timer, but any further form submission doesn't reset the timer, so when it reaches 30 seconds the page navigates away back to the main page.

 

What am I doing wrong?

Categories:
I have the same question (0)
  • pathomson Profile Picture
    44 on at

    I think you need to update the context of the timer to false at the end of your statement (when it is completed the execution), or on the navigation away from the form.

  • Shanescows Profile Picture
    2,218 Most Valuable Professional on at

    I am not following exactly what you are trying to do but I will give you some ideas that I think are the pieces you are missing. 

     

    • You need to reset your timer if they navigate back to the page. For your time set the Reset property to a variable named ResetTimer. Have the screen on visible run UpdateContext({TimerReset: true});UpdateContext({TimerReset: false})
      • This will reset the timer everytime the page loads

    Actually, I think that is all you are missing. 🙂 Let me know if you need more help. I have videos on using the Timer Control and animations (which showcases Timer)

  • v-xida-msft Profile Picture
    on at

    Hi @jw2,

     

    I have made a test on my side, please take a try with the following workaround:9.JPG

     

    The OnVisible property of the Sub-page screen set to following formula:

    UpdateContext({IsReset:false});UpdateContext({IsStart:false})

    The Duration property of the Timer control set to following formula:

    30000

    The OnTimeEnd property of the Timer control set to following formula:

    Navigate(Screen1,ScreenTransition.Fade)

    The Reset property of the Timer control set to following formula:

    IsReset

    The AutoStart property of the Timer control set to following formula:

    IsStart

     

    The OnSuccess property of the Form (Edit Form) set to following formula:

    UpdateContext({IsReset:true});
    UpdateContext({IsStart:true});
    ResetForm(Form1);
    UpdateContext({IsReset:false});
    UpdateContext({IsStart:false})

     

    Best regards,

    Kris

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard