I ran into a problem with PowerApps not having built-in capabilities for running background tasks or timers… the app must be in the foreground for the timer to run.
The business need is: I have a Gallery which are store all my tickets, if I click in an item info button it opens the ticket which is stored by a form. The idea is if you click on the Start button the timer starts to run, and if you go back to the gallery screen to click another ticket to start again the timer you can store all the hold time, the only way to stop the timer and at the same time submit the form to save the values it stores is if you click on the "Stop" button, however, when I close the tab of the App and I go to the ticket I started the time, the time is reset, or if I go back and try to open another ticket and then I go back to the ticket I started the timer the time is reset,
Is there anybody can help me with this? I tried to seek for an answer or a video on Youtube, but there is no information about this.
A timer does not run "in the background" as you have discovered. The only suggestion I have is to store a "start time" in the record, then when it needs to be ended, take the current time and deduct the start time.
Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like. MVP (Business Applications) Visit my blog Practical Power AppsBuy me a coffee
Was this reply helpful?YesNo
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.