Is there a way to track the time taken to complete a process in your Power App? Is it possible to retrieve time taken using timer control?
I have 10 screens, the timer should trigger after a click of a button on the first screen and should be stopped at the end, once the user clicks submit.
Hi @Vignesh_2112 ,
Yes, it is possible, but I do not know if it is possible with Timer. I have an easier solution though.
On the first screen, when the user clicks the start button, you can set a variable using the onSelect property of the button:
And when user clicks submit on the last screen:
Set(endTime, Now()); Set(timeTaken, DateDiff(startTime, endTime, Seconds))
And now you have the total time the user took.
Total time taken is set to timeTaken variable that you can access anywhere in the app after the user clicks submit.
Just set the text property of the button or the text input to:
"Total Time: "&timeTaken&" seconds"
Based on the issue you mentioned, do you want to calculate the time spent on a process?
It seems that the setting time variable is more manageable. We can store the time that the user opens the screen into a variable (eg. on the OnVisible property of the screen). Then on the Submit button, we can work out the duration by calculating the difference between the current time and the initial time.
@ZabiBabar provides the correct direction. I just do some fine-tuning with it.
Add a Label and set the Text property as:
Considering you want to set a timer to track time spent, let me explain. Actually, trigger function can’t be achieved in Timers currently in Power Apps. Especially you have multiple screens to trigger across. The timer only works on the currently active screen.
If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:
Featuring samples like Return to the Workplace and Emergency Response Applications
We're excited to announce our first cross-community 'Can You Solve These?' challenge!
Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.
We are excited for the next Super User season.
Features releasing from October 2020 through March 2021