web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : RnyNLAnsbUCWF+JXyIPXNY
Power Apps - Building Power Apps
Unanswered

Invalid type argument type (control), expected record value

Like (0) ShareShare
ReportReport
Posted on 28 Jul 2021 07:44:03 by 31

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 ?

  • Abhilash_Swain Profile Picture
    901 on 28 Jul 2021 at 13:59:13
    Re: Invalid type argument type (control), expected record value

    Hope this will help you.

    Abhilash_Swain_0-1627480727277.png

    Please give me a Thumbs up if I answered your question and mark it as a solution to help others.

    Thanks

    Abhi

  • mkolodziej Profile Picture
    31 on 28 Jul 2021 at 10:37:23
    Re: Invalid type argument type (control), expected record value

    And I have error 
    wrong type to compare. The following types cannot be compared: text, record

    red underline indicates an equal sign

     

  • Abhilash_Swain Profile Picture
    901 on 28 Jul 2021 at 09:29:46
    Re: Invalid type argument type (control), expected record value

    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

     

  • mkolodziej Profile Picture
    31 on 28 Jul 2021 at 08:28:59
    Re: Invalid type argument type (control), expected record value

    I want edit this exactly item who i choise (I show you on the ss)

     

    wybĂłr.PNG

    i choose this in my list 

     

     

    co zmienic.PNG

    And i Want it change value of this exactly status on click

  • Abhilash_Swain Profile Picture
    901 on 28 Jul 2021 at 08:14:34
    Re: Invalid type argument type (control), expected record value

    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

  • mkolodziej Profile Picture
    31 on 28 Jul 2021 at 08:09:12
    Re: Invalid type argument type (control), expected record value

    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 

  • Abhilash_Swain Profile Picture
    901 on 28 Jul 2021 at 07:51:18
    Invalid type argument type (control), expected record value

    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

     

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete