cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sidacra
Advocate II
Advocate II

OData_IsRecord Odata Error

I have a collection named "colData" that collects data from a specific SharePoint list.

 

ClearCollect(
colData, 'Data List');

 

Next, I used a gallery to show the items in colData and in OnSelect property, I set a variable "selectedItem"

 

Set(
    selectedItem,
    galAll.Selected
);

 

The problem now occurs when I used the variable "selectedItem" to Patch items from PowerApps back to SharePoint List

 

Patch(
'Data List',
selectedItem,
{Segment: segmentTxt.Text, 
Region: regionTxt.Text, 
Country: countryTxt.Text}
);

 

 This is the error:

odata error.png

It always look for the OData_IsRecord.

 

Actions taken:

  • I already remove then add again the SharePoint list in Data source
  • Refresh the connection in Data Source
  • Delete then retype the Patch codes
  • Open then close of PowerApps

Still, it did not solve the issue of the OData_IsRecord column.

 

Please advice what to do as my app won't Patch because of the OData error.

 

Thank you in advance guys.

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @sidacra ,

Do you mean that: you set the gallery's Items to colData and you use  galAll.Selected as the seacond parameter of your patch function?

The problem is:
1)patch function's first parameter is 'Data List', while galAll.Selected represents one item in colData.

That means the first parameter's data source and the second parameter's data source is not the same one.

2) you need to use the same data source for the first and second parameters in the patch function.

 

So you should do this: use galAll.Selected to filter item in  'Data List', then you will get an item from 'Data List'.

 

 

Try this formula:

Patch(
'Data List',
LookUp('Data List',ID=selectedItem.ID),
{Segment: segmentTxt.Text, 
Region: regionTxt.Text, 
Country: countryTxt.Text}
);

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
WarrenBelz
Super User III
Super User III

Hi @sidacra ,

Do the first bit (collection), but on the Gallery OnSelect do this

Set(vID, YourGalleryName.Selected.ID)

Then your Patch

Patch(
   'Data List',
   {ID:vID},
   {
      Segment: segmentTxt.Text, 
      Region: regionTxt.Text, 
      Country: countryTxt.Text
   }
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

v-yutliu-msft
Community Support
Community Support

Hi @sidacra ,

Do you mean that: you set the gallery's Items to colData and you use  galAll.Selected as the seacond parameter of your patch function?

The problem is:
1)patch function's first parameter is 'Data List', while galAll.Selected represents one item in colData.

That means the first parameter's data source and the second parameter's data source is not the same one.

2) you need to use the same data source for the first and second parameters in the patch function.

 

So you should do this: use galAll.Selected to filter item in  'Data List', then you will get an item from 'Data List'.

 

 

Try this formula:

Patch(
'Data List',
LookUp('Data List',ID=selectedItem.ID),
{Segment: segmentTxt.Text, 
Region: regionTxt.Text, 
Country: countryTxt.Text}
);

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thanks @v-yutliu-msft for the alternate version of my post.

@sidacra happy to elaborate further if required.

Hi @sidacra ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @WarrenBelz,

 

Thank you for the follow-up. I'm not sure what happened but after the weekend passed, the Odata error is now gone.

I didn't change or update anything after I posted my issue here. <weird 🤔>

 

Anyways, thank you @WarrenBelz and @v-yutliu-msft for your help.

The error occurred again and this solution works! Thank you! 🙂

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (18,651)