Sharepoint modern list set column as readonly in quick edit view

Anonymous
2021-05-05T14:00:00.05+00:00

Hello,

Can anyone tell me how to set some columns as read-only in the modern list Quick edit view ? I have tried to create calculated columns, but it doesn't support lookup and user fields.

Any help would be appreciated.

Thanks
Sheron

Microsoft 365 and Office SharePoint Development
Microsoft 365 and Office SharePoint For business Windows
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2021-05-08T14:07:47.31+00:00

    Hi All, I have found a solution for this using calculated fields and JSON formatting. You can create a calculated field for the Lookup or People column you want to make as read-only, with formula reference to any single line of text field. And then apply JSON formatting to the calculated field to display the column value of the Lookup or People column. The JSON formatting will apply in the quick edit view. I have a lookup column "DU" which I want to be readonly, so I have created a calculated column hidden_DU with formula reference to the Title field. And applied the below JSON formatting to the hidden_DU field. JSON formatting: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "style": { "flex-wrap": "wrap", "display": "flex" }, "txtContent": "[$DU.lookupValue]" } ![94938-calculatedlookupfield.png][1] Hope it helps !! Thanks. [1]: /api/attachments/94938-calculatedlookupfield.png?platform=QnA


1 additional answer

Sort by: Most helpful
  1. Jerry Xu-MSFT 7,961 Reputation points
    2021-05-06T03:08:55.887+00:00

    Hi, anonymous user ,

    In SharePoint Online, we do not have an out-of-box solution to make a certain list column to be read-only. The calculated column solution is a workaround. If that does not fit your requirements, PowerApps could be an option for you. With it you can do more customization on you list forms.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.