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 / Submit Form with Patch...
Power Apps
Unanswered

Submit Form with Patch together

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello Everyone,

I am new to Power Apps. I need to know on how to submit a form and patch a record together.

 

I have a question. Is it possible to submit a form and on the same formula to patch a column which I want to update?
I just want to update one column with multiple data with a comma separator which is saved in a collection.



Categories:
I have the same question (0)
  • stephybabes Profile Picture
    52 on at

    hey! I had this same question not so long ago.

    Put your patch formula in the "OnSuccess" property of your form 🙂

    This means you can use form1.lastsubmit.id to tell the patch function which record you want to patch! When the record already exists! Else it doesn't exist yet!

    Hope this helps 🙂

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @stephybabes 
    Can you please explain with an example? It would be very helpful.
    Thanks in advance !!

  • timl Profile Picture
    36,780 Super User 2026 Season 1 on at

    Hi @Anonymous 

    @stephybabes suggestion offers a simple solution.

    The thing I would add is that because calling the SubmitForm and Patch will incur 2 separate data operations, I would suggest that it's more efficient for to call just either SubmitForm, or Patch.

    On your form, you can add a hidden card and set the update property to the formula that generates the comma separated values from your collection.

    If you prefer to use the Patch approach, you can call patch and pass the form updates and the additional value that you want to patch.

    Patch(yourDataSource, 
     recordToAddOrUpdate,
     Form1.Updates,
     {colum:"your additional value to patch"}
    )

     

  • stephybabes Profile Picture
    52 on at

    Sure.

    So you have a form that adds an item to your sharepoint list. Let's call it Form1 and List1.

    You also have a button that submits the form.

    Your button's "OnSelect" property needs to be SubmitForm(Form1).

    You also want to add more data to this sharepoint list item that your form doesn't ask the user for, am I right?

    If so, you want the form to create the item, then when it has successfully created the item, to patch on some extra data from somewhere else that isn't the form, yes? 

    So you would select the "OnSuccess" property of form1. 

    And you would put:

    Patch(List1,Form1.LastSubmit.ID,{column1: value1})

    Where value1 might be anything.

    Tell me more about the column you are wanting to add multiple values from a collection to.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @stephybabes & @timl , Thank you for your reply.

    I have written this in my submit button :

    Patch(
    ItemsCollect,
    Defaults(ItemsCollect),
    {Technology: DataCardValue3.Text}
    );
    ForAll(
    Gallery1.AllItems,
    Collect(
    ItemsCollect,
    {Technology: TextInput2.Text}
    )
    );
    Patch(
    EmpDetails,
    Defaults(EmpDetails),
    {
    EmpID: Value(DataCardValue2.Text),
    'Name (Title)': DataCardValue1.Text,
    Department: DataCardValue5.Selected,
    Technology: Concat(
    ItemsCollect,
    Technology,
    ", "
    )
    }
    );

    SubmitForm(SharePointForm1);
    Clear(ItemsCollection);
    Clear(ItemsCollect);
    ResetForm(SharePointForm1);
    NewForm(SharePointForm1);

    I want to save the form in the sharepoint list, where Technology has multiple values. 
    My form has a Technology data card and I have created an ADD button to add more technologies into the Technology column, which I am trying to save it from the Patch function.

    Here is the view of my App : 

    NewToEveryThing_0-1644326986285.png

     

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 600

#2
WarrenBelz Profile Picture

WarrenBelz 478 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard