Hi I have a problem I want update my sharepoint list item "Status" with button and i write this code:
Patch('lista dla bm'; Status; {Status: "Cancelled"})
And the error is: Invalid type argument type (control), expected record value
What I Must change ?
Hope this will help you.
Please give me a Thumbs up if I answered your question and mark it as a solution to help others.
Thanks
Abhi
And I have error
wrong type to compare. The following types cannot be compared: text, record
red underline indicates an equal sign
Patch( 'lista dla bm'; First( Filter( 'lista dla bm';ID= gallery1.selected.ID ) ); { Status: "w toku" } ) .
UpdateIf('lista dla bm',ID= gallery1.selected.ID,{Status: "w toku"})
If you don't have ID column, use any of the unique columns to filter and get the Item.
Please give me a Thumbs up if I answered your question and mark it as a solution to help others.
Thanks
Abhi
I want edit this exactly item who i choise (I show you on the ss)
i choose this in my list
And i Want it change value of this exactly status on click
If I understood correctly, in Patch you can edit only 1 item which is having Status = Planowany.
If you want to edit all items having Status = Planowany, Use UpdateIf instead of a patch.
UpdateIf('lista dla bm', Status = "Planowany",{Status: "w toku"})
Please give me a Thumbs up if I answered your question and mark it as a solution to help others.
Thanks
Abhi
Patch( 'lista dla bm'; First( Filter( 'lista dla bm'; Status = "Planowany" ) ); { Status: "w toku" } )
this worked but is edit first item on the list i Want it edit this item who i chose
Yes, the error is due to 2nd argument which is Status. ( it might be a field name in the form)
Please refer to this https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch and get adjust your syntax accordingly.
Please give me a Thumbs up if I answered your question and mark it as a solution to help others.
Thanks
Abhi
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2