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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Best Way to Save Data ...
Power Apps
Suggested Answer

Best Way to Save Data Entered from Controls in Gallery to SharePoint List

(1) ShareShare
ReportReport
Posted on by 20
Hi, I'm having trouble to decide which function is the best to save all the data entered to SharePoint list. Should I use Patch function or Collect function? and could you guys perhaps help me write the general formula for it? Below is the UI for my apps:

Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,488 Super User 2025 Season 2 on at
    Hi,
     
    You are confusing something.
    Patch is an Expression to create or update data, where as, Collect is an expression to add something to a collection.
     
    Since you are talking about Saving Data you have a couple of options
     
    Option 1
    1. You can add an Edit/New Form on the screen.
    2. Put it in New Form
    3. Add a Button and call it Save/Submit whatever you want
    4. Once the form is populated, you would do a FormName.Submit() to save the record.
     
    Option 2
    1. Use a Patch Statement for a New Record or Update
     
    // to create a new one
    
    Patch(MyTableName, Defaults(MyTableName),
       {
          EmployeeNumber: EmployeeNumberCombo.Selected, // I ASSUME HERE the back end is an Option set
          'Work Order': WorkOrderTextInput.Text
       }
    );
    
    // UPDATING a record - requires passing a reference to the record to update
    Patch(MyTableName, LookUp(MyTableName, SomeColumn=SomeValue),
       {
          EmployeeNumber: EmployeeNumberCombo.Selected, // I ASSUME HERE the back end is an Option set
          'Work Order': WorkOrderTextInput.Text
       }
    );
    
    
    
     
     
     
     
  • I0-23070210-0 Profile Picture
    20 on at
    @FLMike

    Hi!

    Oh! I think you just cleared up my confusion. But, is there no way to just use a Gallery to save the record?
  • Seth18 Profile Picture
    146 on at
    Hi! 
     
    I am not an expert or anything, but you can try doing this Save as Draft in Power Apps Form (youtube.com) as it is actually helpful!  

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard