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 / Using Collection and F...
Power Apps
Unanswered

Using Collection and Forms

(0) ShareShare
ReportReport
Posted on by 6,048 Super User 2024 Season 1

I have a list which consist over 6000 records. App is simple. Records are added and then modified on daily bases. Till now i was using simple SubmitForm. but now on the main screen we need to display all 6k records and not just 2000 which is current limit. I can do that using various methods available here. For Ex. Using collection on OnStart to fetch all the records.

My problem is:

 

My records are added and modified on daily bases. How will it work? Let's say on the main gallery i give data source as collection to shjow all 6k record. When user clicks that records and edit form will open where user will modify the record. And save that to Sharepoint. But, if i use collection how will that work.

q18.jpgq19.jpg

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,941 Most Valuable Professional on at

    Hi @zmansuri ,'

    You need to Patch to the Collection record as well as the List. You can use SubmitForm() for the List update, but will need to Patch to the Collection.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

     

  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    I load all items from the list to collection. Then give this collection as datasource to the below gallery. When user selects the right arrow. It will store the current record in a variable. and navigate to the screen where form is:

    q20.jpg

     

    Form has my SharePoint List as data source. On the save button i have written:

     

    SubmitForm(Form3);
    Patch(MainCol2,varItem,Form3.LastSubmit);

     

    q21.jpg

     

    I tested 2-3 scenario. it is working. Is it the correct way to do this?

  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    My code was only editing record, so i changed it now it's adding and editing record in both SharePoint and collection. Below is my code., Is this correct:

     

    SubmitForm(Form3);
    If(
    varForm1 = "Edit",
    Patch(
    MainCol2,
    varItem,
    Form3.LastSubmit
    ),
    If(
    varForm1 = "New",
    Patch(
    MainCol2,
    Defaults(MainCol2),
    Form3.LastSubmit
    )
    )
    )

  • WarrenBelz Profile Picture
    154,941 Most Valuable Professional on at

    @zmansuri ,

    The collection would need to have all the fields in the list for this to work.

    You are also better putting this on the OnSuccess of the form. You could try this

    Patch(
     MainCol2,
     {ID:Self.LastSubmit.ID},
     Form3.Updates
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard