web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Function using Collection
Power Apps
Answered

Function using Collection

(0) ShareShare
ReportReport
Posted on by 287

Since i am new to collection concept i need a bit more clarification on this :

Consider i am linking a sharepoint list as form in my app,now user will be able to fill in details on that columns which are autofetched from sharepoint list ,now after filling in the data when user is going to click on a button it should take all the currently entered data into a collection in background and again if user wish to add data he/she can do the same in that and finally they can exit.
Now when the approver is logging in to my app (using o365 mail id) he should be able to view all these datas which is lying in collection and should be able to export selected rows from that to excel (may be using flow) and then when he clicks on submit all the rows from collection should be bulk uploaded to my linked sharepoint list.

please help me for this requirement 

Categories:
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @vish_p,

    Do you want to use a Collection to save your form data permanently within your app?

    If you want to use a Collection to save your form data (the user filled in) permanently within your app, I afraid that there is no way to achieve your needs in PowerApps currently.

    The Collection is sometimes used to hold global variables or make a temporary copy of a data source, if your app is closed (current session of your app is closed), this Collection would be deleted/destroyed.

    As an alternative solution, you should also save the Collection or currently entered form data into a data source (e.g. Another SP List) when you save the currently form data into a Collection. Then when your app re-loads, pull the saved data from your data source (mentioned above) into the Collection.

    I have made a test on my side, please take a try with the following workaround:

    Set the OnVisible property of the first screen of your app to following formula:

    ClearCollect(TempCollection,'YourAnotherSPList')

    Set the OnSelect property of the Button control within your Edit screen (contains Edit form) to following:

    Collect(TempCollection,EditForm1.Updates); /* <-- Save current form data into a Collection */
    Patch( /* <-- Save current form data into another data source also */
    'YourAnotherSPList',
    Defaults('YourAnotherSPList'),
    EditForm1.Updates
    )

    Note: The 'YourAnotherSPList' represents the another SP List I mentioned above. This SP list has same data structure/schema as your linked SP list (your Edit form connects to). The EditForm1 represents the Edit form control within your app.

    More details about the Collection function, please check the following article:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-clear-collect-clearcollect

     

    Best regards,

    Kris

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard