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
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
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?
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!
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.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2