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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to catch that the ...
Power Apps
Answered

How to catch that the timer's running?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hey guys,

I've got a problem and tried to solve the issue but I don't get it anyway. I don't know how to succeed.

 

I just want to disable the button if the timer is running. I press the button, the timer starts and now the button should be disabled during the timer is running. If the timer has finished, then the timer gets back to Edit mode.

 

But how to achieve this?

 

Here you can see more about the procedure with the timer and what I've implemented:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Possibility-of-effect-if-new-record-is-added-in-Gallery/m-p/632392#M200491

 

I've tried to write following in DisplayMode of the button:

If(timer.Start; DisplayMode.Disabled)

or

If(timer.Value < timer.Duration; DisplayMode.Disabled)

Here the button is disabled at the beginning but it shouldn't.

 

Really appreciate your help!

ThePowerAppsGuy

Categories:
I have the same question (0)
  • Verified answer
    seanbrogan Profile Picture
    430 on at

    Try the following

     

    Timer OnTimerStart Event
    
    UpdateContext({varRunning:True})
    
    Timer OnTimerEnd Even
    
    UpdateContext({varRunning:False})
    
    Button Display Mode
    
    If(varRunning = True,Disabled,Edit)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Unfortunately it's not working the way I want. Nothing happens.

    Any suggestions?

     

    Thanks so much!

  • seanbrogan Profile Picture
    430 on at

    Try rewriting the come in your language, i.e. semicilons instead of commas.

     

    When you say nothing happens, is the timer's even running?

     

    Test it using some textboxes. I.e. Put a textboxes with the default set to varRunning. This will tell you if the variable is changing or not. Set the fill of another textbox to  If(varRunning = true then green else red)

     

    There is always something happening

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for your reply.


    @seanbrogan wrote:

    Try rewriting the come in your language, i.e. semicilons instead of commas.


    Has already been done 😉.

     


    @seanbrogan wrote:

    When you say nothing happens, is the timer's even running?


    Yes, it's definitely running.

     


    @seanbrogan wrote:

    Test it using some textboxes. I.e. Put a textboxes with the default set to varRunning. This will tell you if the variable is changing or not. Set the fill of another textbox to  If(varRunning = true then green else red)


    Yes, I've tried to rebuild it again in an extra Canvas app. I simulate it not with textboxes and green and red but with button enabled and disabled and it's working. I need to see what's the problem in the whole program.

     

    Let's  see...

     

    Thanks so much for helping!

     

    -- Update --

     

    Related to https://powerusers.microsoft.com/t5/Building-Power-Apps/Possibility-of-effect-if-new-record-is-added-in-Gallery/m-p/632392#M200491

    it's not working. But in an extra app, it is.

     

    Hmmm... how to solve this issue? I'm really frustrated...

    Thanks so much anyway...

  • subsguts Profile Picture
    1,259 Moderator on at

    This doesn't appear to work.  I did this and adding the varRunning variable on the screen and it never gets changed to true.  I set up a very simple test with a button that starts the timer and the variable is never set to True.  This would be really nice if it worked, suggestions?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 366 Most Valuable Professional

#2
11manish Profile Picture

11manish 184

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 99 Super User 2026 Season 1

Last 30 days Overall leaderboard