cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Resolver I
Resolver I

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
Community Support
Community Support

@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
Community Support
Community Support

@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

Thanks,

 

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

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (68,752)