cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Unable to Patch Look Up Column - A value must be provided for item.

Howdy,

 

I cannot get the Patch /odata.type to work even on an extremely simple table with a look up . . details below

 

Primary Table: testMain - No Required fields.

Fields

  1. whatever - Single line of text
  2. NameLookup - Lookup @ testingListValues
    1. Require: No
    2. Enforce unique: No
    3. Get information from: testingListValues
    4. In this column: "Name1" (Contains the values, maybe i need to use ID??)
    5. Enforce relationship behavior: unchecked
  3. ID - default...

List Table: testingListValues - No Required fields.

Fields

  1. Name1 - Single line of text
  2. ID - default...

Onto the power apps details

 

Gallery1

Items: testMain

 

Form1 (for ease of view... not used in patch)
DataSource: testMain
Item: Gallery1.Selected

 

Drop down outside of form (Attempt at ensuring I am not manually entering wrong)

Items: testingListValues

Value: Name1

 

Patch Button - patching into TestMain, the record is the selected gallery item, the updating is for the column NameLookup - and the Id/Value from the dropdown are 1/"Jarrett" respectively (The first row in the testingListValues)

 

Patch(testMain,
First(Filter(testMain,Gallery1.Selected.ID=ID)),{
NameLookup:{
'@odata.type':"#Microsoft.Azure.Connectors.Sharepoint.SPListExpandedReference", Id:Value(Dropdown1.Selected.ID), Value:Dropdown1.Selected.Value
}})

 

Have also used hardcoded as below...

 

Patch(testMain,
First(Filter(testMain,Gallery1.Selected.ID=ID)),{
NameLookup:{
'@odata.type':"#Microsoft.Azure.Connectors.Sharepoint.SPListExpandedReference", Id:1, Value:"Jarrett" }})

I always recieve error: The requested operation is invalid.  Server Response: A value must be provided for item.  clientRequestId: 698b986d-af9a-41dc-952c-2c0e92da4622

 

I've scoured every post on google and powerapps commnity - I can't see what I am doing wrong Man Sad

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper II
Helper II

Figured it out... the content of the @odata.type is very case sensitive 🙂

 

Was using 

"#Microsoft.Azure.Connectors.Sharepoint.SPListExpandedReference"

Should have been using

 

"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"

To contribute a bit... you can assign the above to a variable to make things simpler while typing

 

//First create a variable

Set(odataVar,"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference")

//Usage in patch

Patch(
    DataSource,
    First(Filter(DataSource,SelectedVariable.ID=ID)),
    { StatusLookUp: {
        '@odata.type' : odataVar,
        Value: "",
        Id: 1}})

 

 

View solution in original post

1 REPLY 1
Highlighted
Helper II
Helper II

Figured it out... the content of the @odata.type is very case sensitive 🙂

 

Was using 

"#Microsoft.Azure.Connectors.Sharepoint.SPListExpandedReference"

Should have been using

 

"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"

To contribute a bit... you can assign the above to a variable to make things simpler while typing

 

//First create a variable

Set(odataVar,"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference")

//Usage in patch

Patch(
    DataSource,
    First(Filter(DataSource,SelectedVariable.ID=ID)),
    { StatusLookUp: {
        '@odata.type' : odataVar,
        Value: "",
        Id: 1}})

 

 

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,555)