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 / 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,974 Moderator 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

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