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 / Save multiple records ...
Power Apps
Suggested Answer

Save multiple records before submit

(1) ShareShare
ReportReport
Posted on by 7
I do have this form where you enter the Customer ID and it pulls all the participants in such account.  I'm using the view the best fits for what we need which is a datagrid.   I have to select those participants that are present, among other questions....save and go to the next participant..save, once I finish with this participants and I can continue the form and submit.  I am expecting to see multiple records with the same Submission id and general fields but different for the those specific questions, but this is how look.
 
I created a participants collections with the purpose to save them here temporary until I finish but nothing is working...I have spents weeks trying to get the result I need.
 
Basically override the previous records saved and duplicate the record with null values in the questions.
Screenshot 2026-06-08 105041.png
Categories:
I have the same question (0)
  • Suggested answer
    MS.Ragavendar Profile Picture
    7,431 Super User 2026 Season 1 on at
     
    I guess you are using the SubmitForm() instead of the Patch() this could be issue. 
     
    In power-apps there is no dedicate functionality available for save and submit based on some column you can classify the status. 
     
    Do this in first screen of save /submit (OnSelect) while you navigate.
     
    Set(varSubmissionID,
    Patch(
        DataSource,
        Defaults(DataSource),
        {
            Column1: Value,
            Column2: Value,
            Column3: Value,
        }
    ).ID)
     
    This will create a new entry with available values in the screen and i am storing the Item ID for updating the records .
     
    In the next screen, whenever the user fills and press the save submit we need to update the Item of the last submission - varSubmissionID (in our case)
     
    Patch(
        DataSource,
        LookUp(DataSource, ID=varSubmissionID),
        {
            Column4: NewValue
        }
    )
     
    With this case no records are duplicated and you will not encounter any issues. 
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
    Other Way is In every screen you need to load the data in to collection and don't save anything to the backend only in the final submit the record should be saved in the backend.
     
    ForAll(
        colParticipants,
        Patch(
            PatientTracking,
            Defaults(PatientTracking),
            {
                SubmissionID: varSubmissionID,
                MemberName: ThisRecord.Name,
                BranchName: txtBranch.Text,
                AccountNumber: txtAccount.Text,
                SpecificOccupation: drpOccupation.Selected.Value,
                JointPresentDuringTransaction: chkPresent.Value,
                JoinAddressSameAsPrimary: chkAddress.Value,
                Status: "New"
            }
        )
    )
     
    ✅If this helped, please Accept as Solution to help others ❤️ A Like is appreciated 🏷️ Tag @MS.Ragavendar for follow-ups.
  • CU25040303-0 Profile Picture
    7 on at

    MS.Ragavendar

    This is my FOR all in the Submit Button 
     
    ForAll(
       colParticipants,
        Patch(
            BSAForm_New2,
            Defaults(BSAForm_New2),
            {
                SubmissionID: varSubmitID,
                SubmittedAt: Now(),
         
                AccountNumber: ThisRecord.PARENTACCOUNT,
                AccountTypeDescription: ThisRecord.'Account Type Description',
                MemberName: ThisRecord.'Member Name',
                SpecificOccupation: p.ParticipantOccupation,
                JointPresentDuringTransaction: p.ParticipantPresent,
                JointAddressSameAsPrimary: p.ParticipantPresent,
       
            }
        )
    );
     
     
    This is my SAVE Button
    Collect(
        colParticipants,
        varSelectedJoint,
        {  
            ParticipantOccupation: editoccupation.Text,
            ParticipantPresent: ParticipantPresent.Checked,
            ParticipantAddressSame: Radio2.Selected.Value = "Yes",
            ParticipantCompleted: true
        }
    );
     
    Notify("Record saved", NotificationType.Success);
     
    Back();

     
     
    and this is my Collection in OnStart (App) 
    ClearCollect(
        colParticipants,
        AddColumns(
            DataGrid2.SelectedItems,
     ParticipantPresent,
            false,
            ParticipantAddressSame,
            false,
            ParticipantOccupation,
            "",
            ParticipantCompleted,
            false
        )
    );

    and this was the result and Thank you very much, I have spent weeks on This with ChatGPT  and Copilot and no progress
     
  • BenKraft Profile Picture
    176 on at
    @CU25040303-0 It is unclear on the exact behavior you want. What do you mean when you say, "among other questions"? What does a "question" mean in this context, a field of your data source? You've mentioned using both a form and a datagrid, but you also reference a radio "ParticipantAddressSame".
     
    What does your app actually look like, what are your data sources, and what errors are you getting?

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard