Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Patch - Invalid Argument Type Control, Expecting Record Value

(0) ShareShare
ReportReport
Posted on by 909 Super User 2024 Season 1

Hi,

 

Getting an error on this on the OnSelect of a button - 

 

Patch('Intake', ID , {' Lead_three': Dropdown2.Selected.Value });

 

getting the error on my ID. 

 

Why is this?

 

Thanks.

  • Verified answer
    LaurensM Profile Picture
    12,510 Super User 2025 Season 1 on at
    Re: Patch - Invalid Argument Type Control, Expecting Record Value

    @wonka1234, you will have to make sure that gblRecordID's value is the correct ID of the record you would like to update. Assuming the correct ID is saved, you can use the following structure to update your record:

     

    Patch(
     'Intake', 
     {ID: gblRecordID}, 
     {' Lead_three': Dropdown2.Selected.Value }
    );
    
    //Alteratively try:
    Patch(
     'Intake', 
     LookUp('Intake', ID = gblRecordID), 
     {' Lead_three': Dropdown2.Selected.Value }
    );
  • wonka1234 Profile Picture
    909 Super User 2024 Season 1 on at
    Re: Patch - Invalid Argument Type Control, Expecting Record Value

    I have the "ID" field or "gblRecordID" which is a #. But neither of these options work

  • LaurensM Profile Picture
    12,510 Super User 2025 Season 1 on at
    Re: Patch - Invalid Argument Type Control, Expecting Record Value

    @wonka1234 which record would you like to update and do you have the record or ID stored somewhere? (or selected via a Gallery)

  • wonka1234 Profile Picture
    909 Super User 2024 Season 1 on at
    Re: Patch - Invalid Argument Type Control, Expecting Record Value

    @LaurensM  Yes update a record. However my button isnt in a editform or gallery. ITs just on a screen.

  • LaurensM Profile Picture
    12,510 Super User 2025 Season 1 on at
    Re: Patch - Invalid Argument Type Control, Expecting Record Value

    Hi @wonka1234,

     

    Do you want to update a record? The second parameter will need a record reference, I will add some examples below:

    Patch(
     'Intake', 
     <RecordReference>, 
     {' Lead_three': Dropdown2.Selected.Value }
    );
    
    //You can change <RecordReference> with e.g. ThisItem in a Form / Gallery, a record saved to a variable, Gallery.Selected...
    //Should the schema not fully match use {ID: ThisItem.ID} instead
    //In a ForAll you may need the optional ThisRecord. instead of ThisItem
    
    //Should you want to create a record use Defaults('Intake') instead

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard