cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

The specified column is read only and cant be modified

I have been starting to get this error the past couple of days, but I am not sure what the issue. when a user create a record (saved in SharePoint), and then wants to go back to edit it. I get the following: 

The specified column is read only and cant be modified

 

at another point, I got this error message as well:

The requested operation is invalid. Server Response: RAIL List failed: Exception from HRESULT: 0x80131904 clientRequestId: bc2f77b0-c1c4-4efc-826c-c7a77425bbb1 serviceRequestId: bc2f77b0-c1c4-4efc-826c-c7a77425bbb1

 

I don't even know which column it is referring to or anything.  A sample of the form is down below...

2020-06-16 15_55_11-.png

 

And on the onselect of the Update RAIL item button is:

 

If(!IsBlank(TextInput1.Text), Patch('RAIL List - Comments',Defaults('RAIL List - Comments'),{RAILID:Gallery1SalesCFTeam.Selected.ID,CommentorName:_myProfile.displayName, Note:TextInput1.Text, NoteDate:Text(Now(),DateTimeFormat.ShortDateTime),Timestamp:Now()}),

Patch('RAIL List - Comments',Defaults('RAIL List - Comments'),{RAILID:Gallery1SalesCFTeam.Selected.ID,CommentorName:_myProfile.displayName, Note:"(RAIL Item was modified, but no new comments were provided)", NoteDate:Text(Now(),DateTimeFormat.ShortDateTime),Timestamp:Now()})) ;
Reset(TextInput1);

Refresh('RAIL List - Comments');

ClearCollect(colNotesSales, ShowColumns(Gallery3.AllItems,"RAILID","Title","Note","NoteDate","Timestamp"));

Set(jsonNotes, JSON(colNotesSales, JSONFormat.IgnoreBinaryData));


Patch('RAIL List', Gallery1SalesCFTeam.Selected, {Updates:jsonNotes});

SubmitForm(Form1); 
Refresh('RAIL List'); ViewForm(Form1); Select(Button5)

 

 

What is the main issue?? I tried disconnecting the Sharepoint data sources, and reconnectiong them, but that didn't help.. 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @imadorkous ,

Yeah, I think your issue is related to it. The "Modified By" field is a System Read-Only field in SP List, which could not be modified from canvas app.

 

If you enable the "Modified By" field in your Edit form (e.g. Form1), when you submit your Edit form (e.g. Form1) data back to your SP List, it would also try to submit the "Modified By" field value from your Edit form back to your SP List.

 

As an fixed solution, please remove these System Read-Only fields (e.g. Modified, 'Modified By', ...) from your Edit form, then try your SubmitForm function again. If you want to review these System Read-Only fields of a submitted record, you could consider add Display form (rather than Edit form) in your app, bind it to specific record in your SP list, then enable corresponding System Read-Only fields there.

 

If my reply is helpful in your scenario, please consider go ahead to click "Accept as Solution" to identify my reply as helpful.

 

Best regards,

 

Best regards,

Community Support Team _ Kris Dai
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

3 REPLIES 3
Highlighted
Community Support
Community Support

Hi @imadorkous ,

Have you enabled some Read-Only fields (e.g. ID field) in your Form1?

Could you please show more details about the error message within your canvas app?

 

Based on the formula that you mentioned, I could not find any syntax error with it. Please make sure you do not enable Read-Only fields, e.g. ID, Created, Modified, 'Created By', 'Modified By', ... etc, within your Form1 or other Edit forms in your app. If yes, please remove these Read-Only fields from your Edit forms, then try your formula again, check if the issue is solved.

 

In addition, please modify your formula as below:

Patch(    // Modify formula here
         'RAIL List - Comments',
		 Defaults('RAIL List - Comments'),
		 {
		     RAILID:Gallery1SalesCFTeam.Selected.ID,
			 CommentorName:_myProfile.displayName, 
			 Note: If(
                                 !IsBlank(TextInput1.Text)
                                  TextInput1.Text,
                                  "(RAIL Item was modified, but no new comments were provided)"
                               ), 
			 NoteDate:Text(Now(),DateTimeFormat.ShortDateTime),
			 Timestamp: Now()
		}
);
Reset(TextInput1);
Refresh('RAIL List - Comments');
ClearCollect(colNotesSales, ShowColumns(Gallery3.AllItems, "RAILID", "Title", "Note", "NoteDate", "Timestamp"));
Set(jsonNotes, JSON(colNotesSales, JSONFormat.IgnoreBinaryData));
Patch(             // Modify formula here
       'RAIL List',
       LookUp('RAIL List', ID = Gallery1SalesCFTeam.Selected.ID),
       {
         Updates: jsonNotes
       }
);
SubmitForm(Form1); 
Refresh('RAIL List');
ViewForm(Form1);
Select(Button5)

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

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

@v-xida-msft ,

The modified formula did not fix the error, but I got more context on the error. See attachment. It says Editor: The specified column is read only and cant be modified.

 

The Modified By card was inserted in the form as view only, so it shouldn't have been updating.. I removed it, and then re-added it, but still no luck. Then I just removed it all together, and it was working fine... Is there reason for this?

 

Hi @imadorkous ,

Yeah, I think your issue is related to it. The "Modified By" field is a System Read-Only field in SP List, which could not be modified from canvas app.

 

If you enable the "Modified By" field in your Edit form (e.g. Form1), when you submit your Edit form (e.g. Form1) data back to your SP List, it would also try to submit the "Modified By" field value from your Edit form back to your SP List.

 

As an fixed solution, please remove these System Read-Only fields (e.g. Modified, 'Modified By', ...) from your Edit form, then try your SubmitForm function again. If you want to review these System Read-Only fields of a submitted record, you could consider add Display form (rather than Edit form) in your app, bind it to specific record in your SP list, then enable corresponding System Read-Only fields there.

 

If my reply is helpful in your scenario, please consider go ahead to click "Accept as Solution" to identify my reply as helpful.

 

Best regards,

 

Best regards,

Community Support Team _ Kris Dai
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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (10,039)