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:
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
Solved! Go to Solution.
Try the following
Timer OnTimerStart Event
UpdateContext({varRunning:True})
Timer OnTimerEnd Even
UpdateContext({varRunning:False})
Button Display Mode
If(varRunning = True,Disabled,Edit)
Try the following
Timer OnTimerStart Event
UpdateContext({varRunning:True})
Timer OnTimerEnd Even
UpdateContext({varRunning:False})
Button Display Mode
If(varRunning = True,Disabled,Edit)
Unfortunately it's not working the way I want. Nothing happens.
Any suggestions?
Thanks so much!
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
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 --
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...
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
197 | |
174 | |
62 | |
33 | |
32 |
User | Count |
---|---|
340 | |
270 | |
109 | |
72 | |
58 |