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

How to not refresh app on start

hi. I have an app which i have published. 

 

The app has choices for the participants/individual users to choose and check from. However, is there a way to save the data the participants entered in the app even when they close the app? 

 

Eg. The checkmarks will still stay checked even when the user reopen the applications. 

 

I short, is there a way for the app to not refresh on start?

7 REPLIES 7
Super User
Super User

Re: How to not refresh app on start

Hi @gingerelm

 

From the below, it sounds like the check boxes are on a per user basis, to store preferences for the app and does not update any data sources with the check-box selection. 

 

If this is the case you can use the loaddata and savedate functions. This will only be stored on the device so if the user has mulitple devices, it might be better to store these preferences in a sharepoint list or CDS.

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-savedata-loaddata

 

Let me know if you don't come right.

 

 

 

 

gingerelm
Level: Powered On

Re: How to not refresh app on start

hi, i actually use the checkboxes to collect the courses being selected by the user from different screens.

 

Then, i display the collection as courses selected which will then be sent to a sharepoint list when the user confirms his selection.

 

i hope the user will be able to still view what he had selected previously even after he closes the app and re enter. i'm not very sure how this savedata loaddata can help. Could you please kindly advice me? thanks !!!!!

Anonymous
Not applicable

Re: How to not refresh app on start

Try this...

 

in the OnVisible property of your first screen declare a Collection that links to your checkboxes - I've set up 3 check boxes, setting the value to be the value of the Checkboxes (which will be false to start with)

 

Then Loaddata into that Collection - the first time it run, this won't do anything.

 

 

ClearCollect(myCheckboxes,{box1:Checkbox1.Value,box2:Checkbox2.Value,box3:Checkbox3.Value});
LoadData(myCheckboxes,"localUserData",true)

Now, for each checkbox make the default value equal to the relevant field in the Collection, eg for checkbox 1

Last(myCheckboxes).box1

Finally, on the OnSelect property of each checkbox, you define the Collection, based on the current values and SaveData locally

ClearCollect(myCheckboxes,{box1:Checkbox1.Value,box2:Checkbox2.Value,box3:Checkbox3.Value});
SaveData(myCheckboxes,"localUserData");
Notify("Saved")

I've added a quick Notify in too, which you can get rid of.

 

When you run for the first time, no checkboxes are selected - each time you select or deselect, the data is saved locally.

 

On subsequent runs, it will find the LocalData, load that in and set the checkbox properties accordingly.

 

This works for me Smiley Wink Good Luck

 

(of course, you have then also got a Collection already populated that you can send to Sharepoint)

gingerelm
Level: Powered On

Re: How to not refresh app on start

hi, thank you for answering, how do you make the default value Last(myCheckboxes.box1)???

Anonymous
Not applicable

Re: How to not refresh app on start

Select the checkbox, click the advanced tab and look under the data area for Default - it should be set as False at the moment.

Anonymous
Not applicable

Re: How to not refresh app on start

I am having probably the same problem . My app was working great , two days ago , I add eda refresh button ,for a gallery which is in the home screen and now , everytime I open the app , it will show my page for like 3-4 seconds without the gallery and then a refreshing page with a circle pops up and for 5-6 sec and then my page shows and then the popo up page and so on . It doesn't end ... 

I have deletet the refresh button i added but nothing changes . 
I really need some help . 
Thanks

TopShelf-MSFT
Level 10

Re: How to not refresh app on start

Thanks for your post @Anonymous - have you reviewed the above proposed solution for the issue you're mentioning? 

 

@TopShelf-MSFT

Helpful resources

Announcements
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

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

Top Solution Authors
Top Kudoed Authors
Users online (6,044)