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

DATA COLLECTION SAVING TO DATASOURCE

HI, ONCE YOU HAVE A COLLECTION OF DATA, HOW YOU ADD OR SAVE DATA TO THE DATA-SOURCE? I KNOW COLLECTING DATA INTO THE COLLECTION BUT HOW TO SAVE PERMANENT TO THE DATASOURCE? HELP PLEASE

 

I CAN SAVE THE DATA STRAIGHT TO THE DATA SOURCE WHICH IS SLOW. SO FROM COLLECTION TO DATA-SOURCE?

10 REPLIES 10
Super User
Super User

Re: DATA COLLECTION SAVING TO DATASOURCE

You will want to take a look at using the Patch function with the ForAll function.

 

Patch function in PowerApps

 

ForAll function in PowerApps



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
LEARN_IT
Level: Powered On

Re: DATA COLLECTION SAVING TO DATASOURCE

Hi, May i'm not clear in my request. If you are collection data into your app which is temporary. How you save that new data to your datasource after you done, because when you go back to app. data is gone.

Sienna
Level 10

Re: DATA COLLECTION SAVING TO DATASOURCE

Just use
SaveData(yourCollectionName,”savedName”)
after collect function

And load data with
LoadData(yourCollectionName,”savedName”)
on your main screen in onVisible or onStart property

That way you will have your collection saved permanently on your device
LEARN_IT
Level: Powered On

Re: DATA COLLECTION SAVING TO DATASOURCE

When you say "SaveName" you mean the name of my Datasource? Sorry, I'm very new on this.

Sienna
Level 10

Re: DATA COLLECTION SAVING TO DATASOURCE

Whatever name you want your collection to be saved in your device
LEARN_IT
Level: Powered On

Re: DATA COLLECTION SAVING TO DATASOURCE

My Datasource Named A1 and created a collection base A1 called B1. Now Im reading all my data from B1. I have Forms that when people submit or save, it's saved IN B1, so, I;m not able to save the new data to A1. If I save my data to A1, the new data will not display because I'm reading from B1. Sorry, i'm learning collection here.

 

Thank you for your help

Sienna
Level 10

Re: DATA COLLECTION SAVING TO DATASOURCE

And what kind is your A1 datasource? Is it a sharepoint or excel or what?
LEARN_IT
Level: Powered On

Re: DATA COLLECTION SAVING TO DATASOURCE

Yes, SP list.

Sienna
Level 10

Re: DATA COLLECTION SAVING TO DATASOURCE

Ohhh... ok then. I thought you were trying to save collection only. In that case forget about what I said with savedata and loaddata. First of all I think you should definitelly take a look at functions as @Jeff_Thorpe suggested. 

I'm not sure if you know why you collecting the sharepoint datasource into a collection because you actually don't need it for editing or adding a row into your datasource. If you want to add a row into your sharepoint datasource then just use Patch function and Update for update

 

Patch(mySPdatasourceName,Defaults(mySPdatasourceName), {column1:"Text", column2: number ....... })

 

for editing use update where you can use your collection

 

Update(mySPdatasourceName, First(collectionName), {column1:"Text", column2: number ....... })

 

You will find more info in function referece pages and my suggestion is to first make a test app and play with them so you now how and what they can do 

 

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,543)