cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Timer Function to track the time taken

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.

 

Thanks

4 REPLIES 4
Highlighted
Continued Contributor
Continued Contributor

Re: Timer Function to track the time taken

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:

Set(startTime, Now())

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.

Highlighted
Helper I
Helper I

Re: Timer Function to track the time taken

How to grab the total time taken, I need to read the time taken in the App itself. Like a Button or textInput

Highlighted
Continued Contributor
Continued Contributor

Re: Timer Function to track the time taken

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"

 

Highlighted
Microsoft
Microsoft

Re: Timer Function to track the time taken

Hi@Vignesh_2112,

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: 

duration​

 

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:

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

 

 

Best Regards,

Qi

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,249)