cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
RonHappel
Level 8

Error updating SharePoint llist by using Update

Hi,

 

I'm getting an error updating a SharePoint list using the Update statement.

The error is:

ErrorKind.GeneratedValue:  An attempt was made to change a column that the data source generates automatically.

The error in on the column ID.  I understand the message, but I don't know how to avoid it.

 

In the app I do this:

Saving the old version of a record:

UpdateContext({ChangeExpenseRecord:First(Filter(Expenses;ExpenseId=EntryExpenseId))})

Later in the app:

Update(Expenses;First(Filter(Expenses;ExpenseId=EntryExpenseId));ChangeExpenseRecord)

This generates the error.

In the docs I read the following:

"If the data source generates a column's value automatically, the value of that column must be reaffirmed."

I don't know what it means or what I have to do.

 

Any ideas to solve this issue?

Thanks in advance

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft v-siky-msft
Microsoft

Re: Error updating SharePoint llist by using Update

@RonHappel,

 

The Update function will replace an entire record in a data source that is not suitable for your case.

You can not patch or update the entire record to the data source, because some of the fields are not editable, you should modify one or more fields instead of the entire record by Patch function.

Reference: Update Patch 

Sik

 

View solution in original post

2 REPLIES 2
Microsoft v-siky-msft
Microsoft

Re: Error updating SharePoint llist by using Update

@RonHappel,

 

The Update function will replace an entire record in a data source that is not suitable for your case.

You can not patch or update the entire record to the data source, because some of the fields are not editable, you should modify one or more fields instead of the entire record by Patch function.

Reference: Update Patch 

Sik

 

View solution in original post

RonHappel
Level 8

Re: Error updating SharePoint llist by using Update

Thanks,

 

I thought it makes the update a bit easier. I've changed the code and it works fine.

Helpful resources

Announcements
thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,106)