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

Community site session details

Session Id : af2U6bpZGWso1OeUyhALt8
Power Apps - Building Power Apps
Answered

Patch function not updating a particular column in SP List

Like (0) ShareShare
ReportReport
Posted on 19 Apr 2022 09:32:43 by 130

Hi All,

I'm patching SP list using patch function but its not working for OrderID column in last patch function.

Before last patch function its working fine.

Here is the code:
If(
IsBlank(TextInput9.Text) && IsBlank(TextInput10.Text),
Notify(
"Enter Delivery Address",
Error
),

If(
Checkbox1_6.Value = true && !IsBlank(TextInput6_3.Text) && !IsBlank(TextInput5_8.Text),
Patch(
Place_Order_Request,
Defaults(Place_Order_Request),
{
ClassOrdered: Checkbox1_6.Text,
Kits: TextInput6_3.Text,
'Kit Fees': TextInput5_8.Text,
OrderID: Label52.Text,
CenterRegisteredMail: varMail,
OrderDate: Today()
}
)
) ;

Patch(
Place_Order_Request,
Defaults(Place_Order_Request),
{
'TotalKits (TotalK_its0)':Label50_1.Text,
GrandTotal:Label.48_1.Text,
OrderID:Label52.Text
},
Form7.Updates
);

)

Thanks,
R

  • r_voyager Profile Picture
    130 on 19 Apr 2022 at 11:08:02
    Re: Patch function not updating a particular column in SP List

    Hi @BCBuizer ,

    Thank you for the input. I resolved it by making custom card for order ID. This way it patched attachments as well as order ID.

    Thanks,

    R

  • r_voyager Profile Picture
    130 on 19 Apr 2022 at 10:39:49
    Re: Patch function not updating a particular column in SP List

    Yes you are right. I removed form7.updates and it patches OrderID. But I used form7.updates to patch attachments to sharepoint list. I'm using custom cards in form that's why I used form7.updates instead of submit(form).

    Any idea how to resolve that?how to patch attachments as well as orderID?

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on 19 Apr 2022 at 09:49:44
    Re: Patch function not updating a particular column in SP List

    Hey!

     

    So, to create new item using Patch:

     

    Patch(

    DataSource,

    Defaults(DataSource),

    {

    ...

    }

    )

     

    To update:

     

    So, to create new item using Patch:

     

    Patch(

    DataSource,

    LookUp(DataSource, ID = Gallery1.Selected.ID),

    {

    ...

    }

    )

     

    Here you can also use Gallery.Selected or a var that is an Item.

    He just want an item to update.

     

    You have 2 defaults, so you are creating the item

     

    https://docs.microsoft.com/en-us/power-apps/maker/canvas-apps/functions/function-patch

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,

    Gonçalo Nogueira

    Check my LinkedIn!

    Buy me a coffee!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

  • Verified answer
    BCBuizer Profile Picture
    22,262 Super User 2025 Season 2 on 19 Apr 2022 at 09:48:15
    Re: Patch function not updating a particular column in SP List

    Hi @r_voyager ,

     

    Does Form7 have a field for OrderID as well? Perhaps the Patch is working as it should, but the Form7.Updates part overwrites the value of the OrderID column.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2