I think you missed ',' before '{'
https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-patch
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I am new to Power Apps and am trying to correct my Patch function to successfully write data back to a SharePoint list. The list contains four fields: Date field, Person field, and two lookup fields. I created cascading drop downs in Power Apps, that work in Power Apps. However, without the Patch function, the two cascading drop down fields are not sending the data back to the SharePoint list. I will share the formula I found and updated it with my fields.
I am adding this Patch function to my Submit button.
The error is here:
W
I think you missed ',' before '{'
https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-patch
Good catch. I added the comma before the curly bracket, but now I have other errors. First this one; Am I using the wrong context here? Should ".Text" be something else? Update?
Trying desperately to get this first one under my belt so I can use this
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more
Hi @Christine L,
Per my test, if you want to update a date column. You could refer to following code
Patch(
'List Name',
LookUp('List Name', ID=1),
{
DateColumnName: Date(2023,07,18) + Time(9,30,0)
}
)
Here is the sample for Person column
Patch(
'List Name',
LookUp('List Name', ID=1),
{
EmployeePerson: {
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|******@companyname.com",
Department: "",
DisplayName: "xxx",
Email: "******@companyname.com",
JobTitle: "",
Picture: ""
}
}
)
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.