Pragmatic Works Nerd News

Improving the Timer in Power Apps | Low to Pro

Written by Ace Philips | Aug 30, 2026

In this episode of Low to Pro, Ace Phillips demonstrates how to enhance the timer functionality in Power Apps model-driven apps. By integrating JavaScript, Ace showcases a method to create a persistent and accurate timer that tracks time even when navigating between tabs or pages within the app.

 

Understanding the Default Timer Control

The default timer control in Power Apps model-driven apps allows users to measure time elapsed since a specific due date. However, it lacks the capability to track real-time intervals such as start and stop times. While canvas apps offer more flexibility, integrating them into model-driven apps presents challenges, including:

  • Timers stopping when navigating between tabs.
  • Limited accuracy and persistence.

Ace's JavaScript Solution

Ace introduces a JavaScript-based solution to overcome these limitations. The approach involves:

  • Creating a start timer function that records the start time and stores it locally.
  • Implementing a stop timer function that calculates the elapsed time and logs it.
  • Ensuring the timer continues running even when switching between tabs or reopening the app.

This method provides a more accurate and persistent timer, suitable for tracking time-sensitive tasks within model-driven apps.

Implementing the Timer in Power Apps

To integrate the custom timer into a model-driven app, follow these steps:

  1. Create a JavaScript Web Resource: Develop a JavaScript file containing the start and stop timer functions.
  2. Upload the Web Resource: In Power Apps, navigate to Solutions, select your solution, and add the JavaScript web resource.
  3. Modify the Command Bar: Use the modern command designer to add buttons for starting and stopping the timer. Assign the appropriate JavaScript functions to these buttons.
  4. Publish Changes: Save and publish the changes to make the new functionality available in the app.

By following these steps, users can implement a robust timer system that enhances task tracking and management within their model-driven apps.

Handling Timer Data

Once the timer is stopped, it's essential to log the elapsed time accurately. Ace's solution involves:

  • Creating a time entry record that captures the start time, stop time, and elapsed time.
  • Using JavaScript to calculate the total elapsed time and update the record accordingly.
  • Ensuring that the elapsed time is displayed in a user-friendly format, such as minutes and seconds.

This approach provides a comprehensive view of time spent on tasks, aiding in better time management and reporting.

Challenges and Future Enhancements

While the implemented solution offers significant improvements, there are areas for further enhancement:

  • Pause and Cancel Functions: Implementing features to pause and cancel timers can provide users with more control over time tracking.
  • Handling Incomplete Records: Adding functionality to manage and clean up incomplete or abandoned timer records can maintain data integrity.

Ace encourages viewers to explore these enhancements and contribute their solutions, fostering a collaborative learning environment.

Conclusion

Ace Phillips' tutorial offers a practical solution to enhance timer functionality in Power Apps model-driven apps. By leveraging JavaScript, users can create a persistent and accurate timer that tracks time across tabs and sessions. This approach not only improves task tracking but also enhances the overall user experience within Power Apps.

For more in-depth tutorials and resources, visit Pragmatic Works' blog and explore our comprehensive training offerings.

Related Resources:

Don't forget to check out the Pragmatic Works' on-demand learning platform for more insightful content and training sessions on Power Apps and other Microsoft applications. Be sure to subscribe to the Pragmatic Works YouTube channel to stay up-to-date on the latest tips and tricks.