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
Solved! Go to Solution.
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.
Sik
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.
Sik
Thanks,
I thought it makes the update a bit easier. I've changed the code and it works fine.
User | Count |
---|---|
239 | |
114 | |
94 | |
58 | |
32 |
User | Count |
---|---|
286 | |
133 | |
106 | |
63 | |
57 |