
I'm running into an issue where any time SaveData is called, the application stops loading data from an external api and no longer works until I start a new session. I'm saving a collection with multiple tables, none of which are over 100 rows. Here is the code I'm using in an OnSelect:
UpdateContext({CheckingUpdates:true});
Set(ErrorVisible,false);
Clear(ConfiguationData);
If(Connection.Connected,
ClearCollect(ConfiguationData, CCFVApi.GetConfiguration());
Set(testsource, "online")
,
LoadData(ConfiguationData, "CCFVConfiguationData", true);
Set(testsource, "offline")
);
SaveData(ConfiguationData, "CCFVConfigurationData");
Set(AuditSuffix, ConfiguationData.FIELDAUDITSUFFIX);
ClearCollect(CCFV_Categories, ConfiguationData.CATEGORIES);
ClearCollect(CCFV_Questions, ConfiguationData.QUESTIONS);
ClearCollect(EnterpriseEntities, ConfiguationData.ENTITIES);
ClearCollect(EmployeesObserved, ConfiguationData.EMPSOBSERVED);
ClearCollect(ObserversPosition, ConfiguationData.OBSRVPOSITONS);
ClearCollect(Departments, ConfiguationData.DEPARTMENTS);
UpdateContext({CheckingUpdates:false});
Navigate(screenStartAssessment, ScreenTransition.Cover)Also, when I copy the code exactly from this tutorial https://powerapps.microsoft.com/en-us/blog/build-offline-apps-with-new-powerapps-capabilities/ , I can get error on the SaveData line claiming LocalTweetsToPost is an invalid name. Here is a
screenshot of that:
To say that developing with PowerApps has been frustrating is an understatement. I've been working with it since May and can't tell you the amount of time we've run into roadblocks due to lack of documentation or general defects in the application itself. I understand this is a new product from Microsoft, but none of our apps have gone to production (and are nowhere near being ready to) because of these issues.
Hi anthonylevine,
About the function you mentioned in the tutorial, please try it this function will work on your side:
If(Connection.Connected,
ClearCollect(LocalTweets, Twitter.SearchTweet("PowerApps", {maxResults: 100}));
UpdateContext({statusText: "Online data"})
,
LoadData(LocalTweets, "Tweets", true);
UpdateContext({statusText: "Local data"})
);
LoadData(LocalTweets, "Tweets", true);
SaveData(LocalTweets, "Tweets")
I guess that this doc about SaveData and LoadData could be a reference for you:
https://powerapps.microsoft.com/en-us/tutorials/function-savedata-loaddata/
I also test your code on my side, when working with Twitter, I don’t get the issue you mentioned. I don’t have to start a new session to keep it working. I assume that it might be caused by the Custom API.
About lacking of documentation, you could send your requirements to us, we will help collect and confirm from our side.
Best regards,
Mabel Mao