Hi,
Im trying to patch a drop down in my sharepoint list and i keep getting an error.
On my first screen i have a list of supplier invoices which on select takes me to another screen with the invoice details in a form. I have a button on the form screen that I want to update the status of the invoice to PAID.
My code is Patch('Supplier Invoices',Gallery1.Selected,{Status:"2"})
Any help would be appreciated.
Regards,
Chris
Solved! Go to Solution.
@mdevaney response is accurate.
However, I have video that explains Patching various column types of SharePoint that might be handy.
https://www.youtube.com/watch?v=g9ChYuTdNd4
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Thanks,
Reza Dorrani, MVP
YouTube
Twitter
It would be helpful if you could supply the error message.
Also, could you please tell what type of column Status is? The code to patch a column is dependent on its type.
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Hi,
This is the error.
The STATUS colum is a choice column.
Regards,
Chris
@Barber_Chris
The 3rd argument of the PATCH function must use this syntax when updating a Choices column
Patch('Supplier Invoices',Gallery1.Selected,{Status: {Value: "2"}})
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
@mdevaney response is accurate.
However, I have video that explains Patching various column types of SharePoint that might be handy.
https://www.youtube.com/watch?v=g9ChYuTdNd4
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Thanks,
Reza Dorrani, MVP
YouTube
Twitter
Hi @Barber_Chris ,
Based on the issue that you mentioned, I agree with @mdevaney 's thought almost. Have you taken a try with solution he provided above?
If the Status field is a Choice type column, you should provide a record value for it rather than Text value. The standard format of record value for Choice type column as below:
{
Value: "Single Option from Choice field"
}
So please modify your Patch formula as below:
Patch(
'Supplier Invoices',
LookUp('Supplier Invoices', ID = Gallery1.Selected.ID), // find the record from your list, which you want to update
{
Status: "PAID" // "PAID" should be an option from the available options of your Status field
}
)
Best regards,
User | Count |
---|---|
206 | |
94 | |
87 | |
47 | |
43 |
User | Count |
---|---|
252 | |
104 | |
103 | |
61 | |
57 |