cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
fishbicki
Helper II
Helper II

Disable input for 10sec after input

Hello,

I have a list of guests and when they check out they just tap on their name. 

But if they press it 2 or 3 times it logs out other people.


How can I disable input on a gallery after making an input or limit the gallery OnSelect input to 1 ?

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @fishbicki :

Do you want to disable a control for 10 seconds?

Because I am not quite sure about your specific settings, I assume that I need to disable the button control for 10 seconds after selecting a button.

The key is to use the timer control with variable to control the controls.

I've made a test for your reference:

1\Add a button control:

OnSelect:

 

UpdateContext({start:true});UpdateContext({var:false}) /*start and var are my custom variable*/

 

DisplayMode:

 

If(var,DisplayMode.Edit,Disabled)

 

2\Add a timer control(Timer2)

Duration:

 

1000 /*10s interval*/

 

OnTimerEnd:

 

UpdateContext({var:true});UpdateContext({start:false});Reset(Timer2) /*At the end of the timer, re-enable the button and reset Timer2*/

 

Reset:

 

true

 

Visible:

 

false /*Hide this control*/

 

2.gif

Best Regards,

Bof

 

View solution in original post

5 REPLIES 5
sayyed007amir
Resolver II
Resolver II

You can use Timer for that.
Start Timer OnChange of Input.

Im new to this. Where is OnChange ? I cannot see it in gallery or screen propperties? 

Timer is a function or do You mean the timer Item ?

v-bofeng-msft
Community Support
Community Support

Hi @fishbicki :

Do you want to disable a control for 10 seconds?

Because I am not quite sure about your specific settings, I assume that I need to disable the button control for 10 seconds after selecting a button.

The key is to use the timer control with variable to control the controls.

I've made a test for your reference:

1\Add a button control:

OnSelect:

 

UpdateContext({start:true});UpdateContext({var:false}) /*start and var are my custom variable*/

 

DisplayMode:

 

If(var,DisplayMode.Edit,Disabled)

 

2\Add a timer control(Timer2)

Duration:

 

1000 /*10s interval*/

 

OnTimerEnd:

 

UpdateContext({var:true});UpdateContext({start:false});Reset(Timer2) /*At the end of the timer, re-enable the button and reset Timer2*/

 

Reset:

 

true

 

Visible:

 

false /*Hide this control*/

 

2.gif

Best Regards,

Bof

 

Hi There @v-bofeng-msft , 

 

I am looking for a similar solution.

 

I have a form that captures the First and Second Temperature of the user. see attached.

 

Once the First Temperature is captured, I would like to disable the Second Temperature for 5 minutes

 

After 5 minutes has elapsed, the user can input the second temperature. However after 30 minutes the second tempeture should be disabled for that record.

 

NB: New form is created via MS Form Pro and saved in a SharePoint List, the Form is only in Edit/View mode for the user in PowerApps, and never in New Mode.

 

@WarrenBelzthoughts?

 

@s1hl3_ukuvuma ,

This is a solved thread, so you are better served posting a new one on this. Also your needs are different in that the Form is not from Power Apps, but Forms Pro.

I do not use this facility (Forms Standard satisfies our requirements), so unfortunately cannot assist in this instance.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,352)