Hello everyone,
I have a button in an a canvas app, that I would like that is get disabled for an hour after it has been clicked.
I used this code to make it disappear:
OnSelect: UpdateContext({presseddate: Now()+ (60/(60*24))})
visible: !(presseddate=Now()+(60/(60*24)))
Obviously this is not the right way, but was trying, and I have no clue on how to make it work,
Anyone can help please?
Thanks
Maybe the Timer control can help you.
In the button's OnSelect property, set a variable to start the Timer and logically set the Timer duration to one hour. From there, in the Timer's OnTimerEnd or OnTimerStart property, make the rest of the necessary modifications for your app.
Hi! I hope I was helpfull. Please always mark the answer that helped you, so others who need it will find it faster.
Forgot to mention, set the button's Display mode property to a variable. Then, in the OnTimerEnd property, of the Timer, define this same variable as you need (view, edit, disabled)...
Hi! I hope I was helpfull. Please always mark the answer that helped you, so others who need it will find it faster.
Like this:
Hi! I hope I was helpfull. Please always mark the answer that helped you, so others who need it will find it faster.
Hi @Greg68
On Start of timer control set Start
OnTimerEnd of timer control use UpdateContext({ ButtonHide:false, Start:false })
On Duration property of timer control as per your requirement 3600=1hr
On visible property of Button If(!ButtonHide,true,false)
On OnStart property of your Button UpdateContext({ Start:true, ButtonHide:true });
I have taken reference from this nice post
User | Count |
---|---|
125 | |
87 | |
86 | |
75 | |
69 |
User | Count |
---|---|
215 | |
180 | |
139 | |
97 | |
83 |