cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jdscott
Level: Powered On

Powerapps moving through commands too fast?

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?

1 REPLY 1
PeteMc
Level 8

Re: Powerapps moving through commands too fast?

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.

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,840)