SOLVED

Conditional formula to editable/readonly columns in Sharepoint List based on the column value

%3CLINGO-SUB%20id%3D%22lingo-sub-2063337%22%20slang%3D%22en-US%22%3EConditional%20formula%20to%20editable%2Freadonly%20columns%20in%20Sharepoint%20List%20based%20on%20the%20column%20value%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2063337%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20to%20asked%20about%20set%20sharepoint%20online%20column%20editable%2Freadonly%20based%20on%20the%20column%20value.%3C%2FP%3E%3CP%3EExample%3A%20if%20field%20status%20%3D%20draft%20%26gt%3B%20editable%2C%20if%20field%20status%20%3D%20approve%20%26gt%3B%20readonly%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EMasha%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2063337%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2064259%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20formula%20to%20editable%2Freadonly%20columns%20in%20Sharepoint%20List%20based%20on%20the%20column%20value%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2064259%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F839147%22%20target%3D%22_blank%22%3E%40Masha_Masha%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20not%20possible%20using%20SharePoint%20default%20capabilities.%20To%20achieve%20this%20you%20have%20to%20customize%20the%20list%20form%20using%20Power%20Apps.%3C%2FP%3E%3CP%3EYou%20need%20to%20set%20the%26nbsp%3B%3CSTRONG%3EDisplayMode%3C%2FSTRONG%3E%20property%20of%20column%20data%20card%20based%20on%20status%20value%20something%20like%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-javascript%22%3E%3CCODE%3EIf(ThisItem.Status.Value%20%3D%20%22Draft%22%2C%20DisplayMode.Edit%2C%20DisplayMode.View)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheck%20below%20examples%20for%20more%20information%3A%3C%2FP%3E%3COL%3E%3CLI%3E%3CA%20title%3D%22Form%20to%20'Read%20Only'%20based%20on%20Status%20value%20column%20and%20lookup%20list%22%20href%3D%22https%3A%2F%2Fpowerusers.microsoft.com%2Ft5%2FBuilding-Power-Apps%2FForm-to-Read-Only-based-on-Status-value-column-and-lookup-list%2Ftd-p%2F444997%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EForm%20to%20'Read%20Only'%20based%20on%20Status%20value%20column%20and%20lookup%20list%3C%2FA%3E%26nbsp%3B%3C%2FLI%3E%3CLI%3E%3CA%20title%3D%22Make%20some%20Text%20Input%20fields%20read-only%20in%20Edit%20Forms%22%20href%3D%22https%3A%2F%2Fpowerusers.microsoft.com%2Ft5%2FBuilding-Power-Apps%2FMake-some-Text-Input-fields-read-only-in-Edit-Forms%2Ftd-p%2F391249%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EMake%20some%20Text%20Input%20fields%20read-only%20in%20Edit%20Forms%3C%2FA%3E%26nbsp%3B%3C%2FLI%3E%3C%2FOL%3E%3CHR%20%2F%3E%3CP%3EPlease%20click%20%3CSTRONG%3EMark%20as%20Best%20Response%3C%2FSTRONG%3E%20if%20my%20post%20helped%20you%20to%20solve%20your%20issue.%20This%20will%20help%20others%20to%20find%20the%20correct%20solution%20easily.%20It%20also%20closes%20the%20item.%20If%20the%20post%20was%20useful%20in%20other%20ways%2C%20please%20consider%20giving%20it%20%3CSTRONG%3ELike%3C%2FSTRONG%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi All,

 

I want to asked about set sharepoint online column editable/readonly based on the column value.

Example: if field status = draft > editable, if field status = approve > readonly

 

Thanks,

Masha

1 Reply
best response confirmed by Masha_Masha (New Contributor)
Solution

@Masha_Masha 

 

This is not possible using SharePoint default capabilities. To achieve this you have to customize the list form using Power Apps.

You need to set the DisplayMode property of column data card based on status value something like this:

 

 

If(ThisItem.Status.Value = "Draft", DisplayMode.Edit, DisplayMode.View)

 

 

Check below examples for more information:

  1. Form to 'Read Only' based on Status value column and lookup list 
  2. Make some Text Input fields read-only in Edit Forms 

Please click Mark as Best Response if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.