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

timer for each item in a gallery

Hello, 

 

Is it possible to create a timer for each item in a gallery? 

The timer should start running when the item is created and stops running when a field is no langer blank. 

 

What really would be nice is that a ceretain time could be added to the timer. 

When an item is created , the incident is already ongoing for several minutes. 

I have a datepicker and 2 dropdowns to patch the starttime of the incident to a textfield ( eg 19/06/2020 16:11) 

I would like to add the difference of the starttime and the creation time to the timer. 

So I can follow up the exact time an incident is ongoing. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: timer for each item in a gallery

Hi @Stijn007 ,

To make a Timer start automatically when you create the record, you could set like this:
1)the timer's Start: 

varstart

2)the formula about creating record:

Patch(....);Set(varstart,true)

 

However, it's supported to triggered a timer to stop by another action.

For now, there're only two ways to make a timer stop:
1)set a timer's duration

2)click the timer

In the first solution, you need to pre-design the duration, which is not dynamic based on your updating time.

In the second solution, you could stop the timer, but you could not get the timer's running time.

 

So I'm afraid the feather that you want could not make in powerapps now.

You could post your view about triggering timer to stop and recording timer's running time here:

https://powerusers.microsoft.com/t5/Ideas/ct-p/PA_Comm_Ideas

 

For now, I think the best way is the alternative solution that I provided in the first time.

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Highlighted
Resolver V
Resolver V

Re: timer for each item in a gallery

HI,

 

There is a timer control in pwerapps:

 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-timer

 

 

Highlighted
Community Support
Community Support

Re: timer for each item in a gallery

Hi @Stijn007 ,

Do you want to record the time when every field's updated?

Since the timer control will reset every time you close the app, so I do not recommend you use Timer control to record the time when every field's updated.

As an alternative way, I suggest you add updating-time fields for every filed. When you update one field, you update that updating-time field.

For example:

You have field1,field2,field3 in your data source.

Insert these fields:

field1time, field2time, field3time (date time data type)

When you update field1, use formula like this:

Patch(list,Defaults(list),{filed1:...,field1time:Now()})

When you update field2, use formula like this:

 

Patch(list,Defaults(list),{filed2:...,field2time:Now()})

 

When you update field3, use formula like this:

 

Patch(list,Defaults(list),{filed3:...,field3time:Now()})

 

Then if you want to compare the time that the record was created and the time that the field was updated, you just need to compare this record's Created column and field1time, field2time, field3time column.

Usually DateDiff function will return the time interval.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper III
Helper III

Re: timer for each item in a gallery

@v-yutliu-msft ,

 

The timer doesn't have to start stop every time when a field has changed. 

It has to start when an item is created. and stop when the the field "Incident Normalised " isn't blank anymore. 

so for each item = Incident, i have the time to resolve the incident. 

 

Because the incident is already ongoing when the item is created. they can fill in the exact start time and so we I can add that time to the Timer. ( formula for difference between created date and the filled in start time incident i have already found. 

 

 

 

Highlighted
Community Support
Community Support

Re: timer for each item in a gallery

Hi @Stijn007 ,

To make a Timer start automatically when you create the record, you could set like this:
1)the timer's Start: 

varstart

2)the formula about creating record:

Patch(....);Set(varstart,true)

 

However, it's supported to triggered a timer to stop by another action.

For now, there're only two ways to make a timer stop:
1)set a timer's duration

2)click the timer

In the first solution, you need to pre-design the duration, which is not dynamic based on your updating time.

In the second solution, you could stop the timer, but you could not get the timer's running time.

 

So I'm afraid the feather that you want could not make in powerapps now.

You could post your view about triggering timer to stop and recording timer's running time here:

https://powerusers.microsoft.com/t5/Ideas/ct-p/PA_Comm_Ideas

 

For now, I think the best way is the alternative solution that I provided in the first time.

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
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

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

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,130)