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 / Patch function not upd...
Power Apps
Answered

Patch function not updating a particular column in SP List

(0) ShareShare
ReportReport
Posted on 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

Categories:
  • Verified answer
    BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    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.

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    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!

  • r_voyager Profile Picture
    130 on at

    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?

  • r_voyager Profile Picture
    130 on at

    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

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

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard