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

 

View solution in original post

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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

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

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,453)