Skip to main content

Notifications

Community site session details

Community site session details

Session Id : WRUyYO97530duI/MU2hmpu
Power Apps - Building Power Apps
Answered

Patch help!

Like (0) ShareShare
ReportReport
Posted on 5 Oct 2018 09:24:36 by 43

Hi,

So I am new to PowerApps, done a lot of Googling to help me to get to where I am now. 

There is one bit I am really struggling with which is using the "patch" function.

 

When I am using the data cards in my patch I put the closing bracket on and it comes up with an error that patch function has errrors and that my datacards couldn't be found and must have been deleted but I can see them in the form. I have tried using the data card values which does not give me an error but when I save the form into my Sharepoint List the new entry is empty.

 

I am beyond confused with this now but am sure I am doing something wrong.

 

Any help would be greatly appreciated!

 

thanks

Categories:
  • Verified answer
    v-xida-msft Profile Picture
    on 10 Oct 2018 at 01:56:52
    Re: Patch help!

    Hi @amydixanne,

    Could you please share more details about the Patch formula within your app?

    Further, could you please share a bit more about the error message?

    Currently, we could use Patch function to create records or modify records in a data source, or merge records outside data source.

    The standard formula format for creating a record or records:

    Patch(
    datasource,
    Defaults(datasource),
    {
    Column1:Value1,
    Column2:Value2,
    Column3:Value3,
    ...
    }
    )

    The standard formula format for modifying a record or records:

    Patch(datasource, BasedRecord, ChangeRecord1, [ChangeRecord2, ...])

    The standard formula format for merging records:

    Patch( Record1, Record2 [, …] )

    More details about Patch function in PowerApps, please check the following article:

    Patch function

    If you want to save your form data into your SP list using Patch function, please check the following article:

    Patch(
     'YourSPList',
     Defaults('YourSPList'),
     {
     Column1: DataCardValue1.Text, 
     Column2: DataCardValue2.Text, 
     Column3: DataCardValue3.Text, 
     ...
     ColumnN: DataCardValueN.Selected.Value,
     ...
     }
    )

    More details about saving form data into SP list using Patch function, please check the following video:

    https://www.youtube.com/watch?v=k3gT-HxUhL8

     

    Best regards,

    Kris

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 05 Oct 2018 at 16:35:17
    Re: Patch help!
    Hi Amy,
    If you are using an Edit form, you don't need a patch. Why not use a button with the OnSelect property SubmitForm(Form1) where form1 is the name of your form

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
MS.Ragavendar Profile Picture

MS.Ragavendar 14

#2
LC-26081402-0 Profile Picture

LC-26081402-0 10

#3
stampcoin Profile Picture

stampcoin 6

Overall leaderboard
Loading started