web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Need help adding a Cou...
Power Apps
Unanswered

Need help adding a Countdown timer

(0) ShareShare
ReportReport
Posted on by 2

Hey creators, I have created a simple app to to keep track of some instruments and I'm trying to add a Countdown timer for each individual item in the Gallery.

Context: Need to start a 3hour countdown for the selected Item only, after a Form is edited and Submit button is clicked. Once the countdown is 0, need a particular data in the selected parent Item to be erased. (Timer needs to be counting down even after closing the app)

Rk_Anonymous_0-1708670883694.png

This is one of the item in gallery.

 

Timer functions : 'Text'=Text(Time(0, 0,(Timer7.Duration-Timer7.Value)/1000), "hh:mm:ss") & 'Duration'=10800000
The 'Start' for Timer control is set to a variable 'TimerStart' which is defined in another screen as mentioned below
The 'OnSelect' for Submit button to a form is = SubmitForm(EditForm1);Set(TimerStart, true);

 

The timer doesn't seem to start after clicking the Submit form and going back to the Gallery(even if it does start, timers are counting down for all the items instead of selected one. Also how do I delete data in the selected item after the timer countsdown to 0 (Realworld usage: remove the username from the instrument after 3 hours)

 

 

Categories:
I have the same question (0)
  • Rajkumar_M Profile Picture
    3,741 Super User 2025 Season 2 on at

    Hi @Rk_Anonymous 

     

    Try this

     

    Gallery1 Item Template:

     

    - Add a Timer control named Timer7
    - Set Duration property to 10800000 (3 hours in milliseconds)
    - Set Start property to TimerStart
    - Set Text property to: Text(Time(0, 0, (Timer7.Duration - Timer7.Value) / 1000), "hh:mm:ss")

     

    SubmitButton OnSelect property:

     

    SubmitForm(EditForm1); Set(TimerStart, true)

     

    Timer1 OnTimerEnd property:

    RemoveIf(YourDataSource, ID = Gallery1.Selected.ID)

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

     

  • Rk_Anonymous Profile Picture
    2 on at

    Thanks, but what you've suggested is the same what I have mentioned and used, but it isn't working.

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.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard