cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Save gallery row

Dear Support team,

 

The subject might be generic to you. Let me describe a bit about my question. 

 

Actually, we are doing sth to display employee list under line manager to appear in the gallery with adding textinput where we allow to input data and click submit button. 

 

We are using collection and patch those information to our table in sharepoint.

 

The coding and flow is working well.  However, when we close the screen then start it again, then in the gallery, it will refresh to the blank field one, because collection won't store record.

 

Is there anyway where we can show the previous record to the screen?  Thanks, PS

 

 

2020-08-05 15_12_55-Let's Talk & 360 Feedback - Power Apps.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Save gallery row

Hi @phearin :

Could you tell me whether this app is opened in a browser or on a mobile device?

If this app is opened in a browser,I suggest you don't use collection to save the data.

If this app is opened on a mobile device, I suggest you save the collection locally before closing the app, and then load the collecion the next time you open the app (to prevent the data in the collection from disappearing after closing the app).

The point is using SaveData function and LoadDate function.I've made a test for your reference:

I created a collection "TestCollection" using a button

 

ClearCollect(TestCollection,{Value:"Test"},{Value:"Test"})

 

and created a table to dispaly the collection.

1\Set the button's OnSelect Proeprty to:

ClearCollect(TestCollection,{Value:"Test"},{Value:"Test"});SaveData(TestCollection,"SaveTestCollection")

2\Set the apps OnStart Property to:

LoadData(TestCollection,"SaveTestCollection")

35.gif

When I open the app again, the data in the collection still exists.

I think this link will help you a lot:

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

Best Regards,

Bof

 

 

 

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Save gallery row

Hi @phearin :

Could you tell me whether this app is opened in a browser or on a mobile device?

If this app is opened in a browser,I suggest you don't use collection to save the data.

If this app is opened on a mobile device, I suggest you save the collection locally before closing the app, and then load the collecion the next time you open the app (to prevent the data in the collection from disappearing after closing the app).

The point is using SaveData function and LoadDate function.I've made a test for your reference:

I created a collection "TestCollection" using a button

 

ClearCollect(TestCollection,{Value:"Test"},{Value:"Test"})

 

and created a table to dispaly the collection.

1\Set the button's OnSelect Proeprty to:

ClearCollect(TestCollection,{Value:"Test"},{Value:"Test"});SaveData(TestCollection,"SaveTestCollection")

2\Set the apps OnStart Property to:

LoadData(TestCollection,"SaveTestCollection")

35.gif

When I open the app again, the data in the collection still exists.

I think this link will help you a lot:

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

Best Regards,

Bof

 

 

 

View solution in original post

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,597)