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 / Patches incomplete whe...
Power Apps
Answered

Patches incomplete when buttons clicked too quickly

(0) ShareShare
ReportReport
Posted on by 84

I have two radio buttons in my app.  Each button has 2 patch statements within the OnChange property.  One patch statement updates the radio button selection's value into a Choice field in a SharePoint List.  Another patches a calculated text label value associated with that radio button selection to a 2nd field in the SharePoint list.

 

I have noticed that at times, when selecting the radio buttons too quickly, the patches will not complete properly.  For example, the 2nd patch in one of the button's OnChange property won't push the updated calculated text label value to the SharePoint List.  I believe this is happening because PowerApps is still processing the first selection when the 2nd one is being made.

 

Is there a way to ensure the statements in a particular action get completed and not interrupted?  Can PowerApps queue the statements to ensure they don't get lost?

Categories:
  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Pegger ,

     

    You could try to use “ ; ”.

    For example: 

    Clearcollect(Test,{A:”111”});Clear(Test)

    It will execute the clearcollect() function first and then execute the clear() function.

     

    Best Regards,

    Wearsky

    If my post helps, then please consider Accept it as the solution to help others. Thanks.

  • Pegger Profile Picture
    84 on at

    Thanks for that.  I do already have ";" in there.  It actually works ok when clicking one radio button and then waiting even 3 seconds and then clicking the next radio button.  The problem is if they are clicked quickly.  The problem is I can't prevent the user from doing that, but I can't also risk the patches not executing and capturing their entries.

  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Pegger ,

     

    After you press the first button, it takes a while to execute the formula.

    If the second button is pressed during the execution of the formula, the result will indeed be wrong.

     

    So, I suggest you modify the display mode property of the second button.

    You could try to set a variable.

    Set(A,DisplayMode.View)

    Then, You could modify the value of the variable at the first button.

    Set(A,DisplayMode.Edit)

     

    Before the formula of the first button is executed, the second button cannot be clicked.

     

    Best Regards,

    Wearsky

    If my post helps, then please consider Accept it as the solution to help others. Thanks.

  • Pegger Profile Picture
    84 on at

    @v-xiochen-msft thank you! This was a great idea and helped me sort it out.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard