Skip to main content

Notifications

Community site session details

Community site session details

Session Id : ErRNJ0qYk39WQN6SF9pxYr
Power Apps - Building Power Apps
Answered

Patch error : expected record

Like (0) ShareShare
ReportReport
Posted on 12 Jul 2021 12:03:53 by 945

Hi guys,

 

While Patch, I face an error saying "the type of this argument "my field" does not with the expected type Record, found Number"

 

My data source is CDS, and the field that wants to insert is a lookup column. As the input column is based on the Edit form which has the Datacard, how would be the patch ?

 

I'm using something like this : 

Patch('Jobs',
Defaults('Jobs'),
{'Order': Value(DataCardValue3.Text),

....}

 

The DataCardValue3 is the name of the control in the edit form which is the field of my field : Order

 

Kindy help. 

Thanks

Categories:
  • CNT Profile Picture
    10,919 Super User 2025 Season 1 on 12 Jul 2021 at 15:40:42
    Re: Patch error : expected record

    @Axal Glad to help!

  • Axal Profile Picture
    945 on 12 Jul 2021 at 15:33:38
    Re: Patch error : expected record

    It works
    Thank you both.

  • DylanSimons Profile Picture
    326 on 12 Jul 2021 at 14:55:59
    Re: Patch error : expected record

    @CNTis correct, that should work for the patch.

  • Verified answer
    CNT Profile Picture
    10,919 Super User 2025 Season 1 on 12 Jul 2021 at 14:47:25
    Re: Patch error : expected record

    @Axal Your 'Order' column is a LookUp and you are sending it a number.

    Assuming that DataCardValue3 is a dropdown, change the formula to,

    'Order': DataCardValue3.Selected

  • Axal Profile Picture
    945 on 12 Jul 2021 at 14:42:11
    Re: Patch error : expected record

    Hi @CNT 

     

    This is it :

    Axal_0-1626100735126.png

     

     

    Hi @DylanSimons ,

    Yes, however my datasource is CDS not Sharepoint, and unfortunately, I'm not a developer so I don't understand how to translate that to CDS.

     

    Thanks,

  • CNT Profile Picture
    10,919 Super User 2025 Season 1 on 12 Jul 2021 at 14:06:31
    Re: Patch error : expected record

    @Axal could you share a screen shot of the entire formula along with the error message.

  • DylanSimons Profile Picture
    326 on 12 Jul 2021 at 13:35:36
    Re: Patch error : expected record

    Hello, you need to patch the entire record associated with the lookup column. Please see the link below, which describes it nicely.

     

    https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-patch-a-SharePoint-Lookup-Column/td-p/24094

     

    I have much more luck simply using an edit form and SubmitForm() to patch it even if the lookup column is the only field in the edit form.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 42 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 41 Super User 2025 Season 1

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 36

Overall leaderboard