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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Error: The type of thi...
Power Apps
Unanswered

Error: The type of this argument does not the expected type table. Found type record. Trying to patch combobox selected item back to lookup list in SharePoint

(0) ShareShare
ReportReport
Posted on by 18

Hello there, 

 

I have created repeating tables gallery but have added a combobox to select an item from a pre existing list. The list items are showing in the combobox and these are a selection from the main Sharepoint list. However, I am unable to get the items to patch to the Sharepoint list and get the error ' The type of this argument does not the expected type table. Found type record'. 

 

The OnSuccess field of the form has the following code for this item: 

BillToCode: {
Id: cbBillingItem.Selected.Id,
Value: cbBillingItem.Selected.Value

 

and the save icon in the gallery has the following:

BillToCode: {'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: ThisItem.BillToCode.Id,
Value: ThisItem.BillToCode.Value
},

 

I realise this is completely wrong now but have tried so many things I can't think straight, any help is appreciated 

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @JaS_22 

    This is indicating that your column in SharePoint is expecting a table - meaning that you have it defined to allow multiple selections.  Please verify your definition of the BillToCode column in your list.

    Also, you can get rid of the odata.type part of your formula - it is no longer needed.

     

    I hope this is helpful for you.

  • JaS_22 Profile Picture
    18 on at

    Thanks for getting back to me so soon. Yes, I have multiple selections enabled on the lookup column in Sharepoint, shall I turn this off? The column is looking up the billing code value from another Sharepoint list with list name and column specified (Title column)

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @JaS_22 

    Well that depends...do you want multiple selections? 

  • JaS_22 Profile Picture
    18 on at

    No I don't think I do, I have just been trying a lot of different things because I cant get the combobox selected item to patch to the lookup column in SharePoint. I have unchecked this and removed the odata. However, I am now getting an invalid argument in the repeating tables gallery of 'expecting a record value but of a different schema'

  • JaS_22 Profile Picture
    18 on at

    some of my code is clearly wrong but not sure what it should be 

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @JaS_22 

    Can you provide some of the formulas where you are getting an error?

  • JaS_22 Profile Picture
    18 on at

    The error is happening in the gallery icon patch, all the other items are patching through accurately except the combobox selection. At the moment, I have the below for this


    Patch(Timesheetcollection, ThisItem,{

    BillToCode: cbBillingItem.Selected,

    });


    Collect(Timesheetcollection, {

    BillToCode: {
    Id: cbBillingItem,
    Value: cbBillingItem
    },

    }))

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @JaS_22 

    So you have two things there...one is trying to patch a record and one is creating a record in the Timesheetcollection.

    Both are most likely using two different schemas as in the first you are using the Selected record and in the Second, you are specifying the record. 

    So, what is the Items property of your cbBillingItem combobox then?

     

     

  • JaS_22 Profile Picture
    18 on at

    Hi thanks for the response, currently it is as below 

     

    Filter(
    Choices([@BillToAssign].BillTo),
    Value in Concat(
    Filter(
    BillToAssign,
    Title = varUser.FullName
    ).BillTo,
    BillTo.Value
    )
    )

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @JaS_22 

    What is your intention with that formula?  It will only return BillTo values that are found in records where the Title is the user FullName.

    Is that what you are looking for?

     

    Then, back to the collection...why then are you trying to populate with a value in one place and a record in another?  Is that just a mistake or did you have some intention with it?

     

    Trying to get a good feel for what you are attempting first.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard