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

The specified column is read-only and can't be modified

I am using a SharePoint integrated form and have collected the selected record in a collection.

I am then modifying this record inside the collection via form and Patch functions.

At the end I wanted to patch the changes back to the datasource via: 

- Patch(SharePointList,myCollection)

But I am countinuously getting the error: {VersionNumber}: The specified column is read-only and can't be modified...

I have tried to drop the version number via DropColumns function but then I get error for another field and another field and another field...

 

Please kindly support what is the issue... I think this should supposed to work since the columns in source and Collection are the same.. (i have a high number of columns though, around 70...)

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @Student2 :

Could you show me the data structure of myCollection

Firstly,let me explain why you encounted this problem.

The point is {VersionNumber} is a standard read-only field in the sharepoint list. There are many such fields, such as:ID,Modified,Created……

Secondly,I suggest you filter out the required fields to update.

For example:

Patch(SharePointList,ShowColumns(myCollection,"Column1","Column2","Column3"))

Or 

ForAll(
 mycollection
 Patch(SharePointList,Defaults(SharePointList),{Column1:Column1,Column2:Column2})
)

Best Regards,

Bof

 

View solution in original post

2 REPLIES 2
v-bofeng-msft
Community Support
Community Support

Hi @Student2 :

Could you show me the data structure of myCollection

Firstly,let me explain why you encounted this problem.

The point is {VersionNumber} is a standard read-only field in the sharepoint list. There are many such fields, such as:ID,Modified,Created……

Secondly,I suggest you filter out the required fields to update.

For example:

Patch(SharePointList,ShowColumns(myCollection,"Column1","Column2","Column3"))

Or 

ForAll(
 mycollection
 Patch(SharePointList,Defaults(SharePointList),{Column1:Column1,Column2:Column2})
)

Best Regards,

Bof

 

@v-bofeng-msft is this still the only working solution in 2022? If all required fields need to be mentioned in the formula it's hard to maintain it.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,349)