Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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

  • r_voyager Profile Picture
    130 on at
    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 at
    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 at
    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,165 Super User 2025 Season 1 on at
    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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >