Forum Discussion
Sharepoint list conditionnal inlineEditField
Hello,
Is there a way to make inline editing active according to a value in another column of the list ?
e.g. if I have two text columns called "Editable" and "FieldName", could I get an inline editing of the cells "FieldName" only if the cell "Editable" is equal to "Yes" ?
I have tried
{
"elmType": "div",
"inlineEditField": "=if([$Editable]=='Yes',[$FieldName],'')",
"txtContent": "[$FieldName]"
}
and
"inlineEditField": {
"operator": ":",
"operands": [
{
"operator": "==",
"operands": [
"[$Editable]",
"Yes"
]
},
"[$FieldName]",
""
]
},
Thanks for your help.
JulienG_ this is not possible by design. Instead, you can setup multiple elements that display or hide based on status. Using your example, you would want to set up your json like the image below. Lines 1-8 show the element that is editable inline when [$Editable]=='Yes'. However, that field is "No" the editable element will not show (i.e. display is set to none) and the non-editable element will show up instead.
- jphepp3Copper Contributor
JulienG_ this is not possible by design. Instead, you can setup multiple elements that display or hide based on status. Using your example, you would want to set up your json like the image below. Lines 1-8 show the element that is editable inline when [$Editable]=='Yes'. However, that field is "No" the editable element will not show (i.e. display is set to none) and the non-editable element will show up instead.
- Ryan_FinanceCopper Contributorjphepp3 Your response didn't get the credit it deserves... What may have been the simplest thing for you, has just solved my nightmare. Thanks for posting this comment. You are the real MVP 👍🏽
- jphepp3Copper ContributorRyan_Finance, that's very kind and I'm glad I could assist you. Best of luck!