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 / Powerapps moving throu...
Power Apps
Unanswered

Powerapps moving through commands too fast?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a Patch to my database that isn't working even though the syntax is identical to another location what works perfectly. 

 

the following is in the OnSelect property of a button:

If( 
 Connection.Connected && CountRows( ColInspections)>0,
 Collect( todaysFHs, ColInspections); 
 Collect( Inspections, ColInspections);
 Clear( ColInspections);
 SaveData( ColInspections, "LSInspections")
 , 
 Connection.Connected && CountRows( EditsHoodList)>0,
 Patch( HoodList, BRHoodList, EditsHoodList);
 Refresh( HoodList);
 ClearCollect( RefHoodList, HoodList);
 Clear( EditsHoodList);
 Clear( BRHoodList);
 SaveData( RefHoodList, "LSRefHoodList");
 SaveData( EditsHoodList, "LSEditsHoodList");
 SaveData( BRHoodList, "LSBRHoodList") 
 )

The Patch in question is halfway through. I've checked the contents of BRHoodList and EditsHoodList and they are fine. I've also run that exact patch with HoodList replaced with a copy of the table called RefHoodList. And I've put the patch as seen above Patch( HoodList...) on a button without any other code and it worked. 

 

I think that the Patch is not able to complete because the tables used in the patch are cleared in the following lines of the above code. 

 

If I'm right, how can I work around this and still reconcile my data all in one click?

If I'm wrong, what might be going on?

Categories:
I have the same question (0)
  • PeteMc Profile Picture
    168 on at

    You can always try to add the code that needs a delay to a timer and then kick the timer off in you onselect code.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 491

#2
WarrenBelz Profile Picture

WarrenBelz 407 Most Valuable Professional

#3
11manish Profile Picture

11manish 331

Last 30 days Overall leaderboard