cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TheRobRush
Level 8

Offline Mode Doubling Records

When I submit a ticket in online mode, my code works perfectly, it updates the table with 1 record for the entry.

 

Once I turn on airplane mode to test offline mode something funny happens.

 

the first item i submit results in

 

2 offline items to be added (label box whose code i wont type cause its not where the problem is)

 

the second item I submit results in

 

6 offline items to be added.

 

seems liek when i hit submit it stores item 1, then stores item 1 again and the already stored list, then same for item 2 so we end up with 4 item 1s and 2 item 2s...

 

For the life of me I am not seeing what I put wrong in this code, need some fresh eyes.

 

 

      If(Connection.Connected,SubmitForm(EditForm1); Refresh(Table1_1); ClearCollect(Barcodes,Table1_1);
      SaveData(Barcodes,"Offline"); ResetForm(EditForm1),
      Collect(IssuesToBeAdded,          

      {BARCODESmiley Very HappyataCardValue1.Text,TICKET_x0020_TYPESmiley Very HappyataCardValue2.Text,TIMESmiley Very HappyataCardValue4.Text} ); 
      

      SaveData(IssuesToBeAdded, "OfflineNotAdded"));

     

      LoadData(IssuesToBeAdded,"OfflineNotAdded", true)

 

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
TheRobRush
Level 8

Re: Offline Mode Doubling Records

Figured it out, was the load at the end.   

So simple, I missed it.

1 REPLY 1
TheRobRush
Level 8

Re: Offline Mode Doubling Records

Figured it out, was the load at the end.   

So simple, I missed it.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 225 members 4,680 guests
Please welcome our newest community members: