I would like to format a choice column (Multi-Selection) to have checkboxes next to each choice that allows users to "check" the box and apply a strikethrough on the corresponding choice. Currently, I am using a choice field (multi-selection) and a Yes/No column to achieve the functionality below. However, I am only able to have all selected or none selected for the strikethrough. I have provided screen shots and the code used. Thank!


Yes/No JSON
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"children": [
{
"elmType": "div",
"style": {
"display": "flex",
"flex-direction": "column",
"justify-content": "flex-start",
"flex-wrap": "wrap",
"margin": "5px 0px"
},
"children": [
{
"elmType": "div",
"forEach": "choiceIterator in [$Tasks]",
"style": {
"margin": "3px 0px",
"display": "flex",
"flex-direction": "row",
"align-items": "center",
"cursor": "pointer"
},
"children": [
{
"elmType": "div",
"style": {
"margin-right": "5px",
"padding-top": "3px"
},
"attributes": {
"iconName": "=if(@currentField, 'CheckboxComposite','Checkbox')"
},
"customRowAction": {
"action": "setValue",
"actionInput": {
"Completed": "=if(@currentField , '0' , '1' )"
}
}
}
]
}
]
}
]
}
Choice column JSON
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"children": [
{
"elmType": "div",
"style": {
"display": "flex",
"flex-direction": "column",
"justify-content": "flex-start",
"flex-wrap": "wrap",
"margin": "5px 0px"
},
"children": [
{
"elmType": "div",
"forEach": "choiceIterator in @currentField",
"style": {
"margin": "1px 0px",
"display": "flex",
"flex-direction": "row",
"align-items": "center"
},
"children": [
{
"elmType": "div",
"txtContent": "[$choiceIterator]",
"style": {
"text-decoration": "=if([$Completed],'line-through','inherit')",
"margin": "1.5px"
},
"attributes": {
"class": "ms-fontColor-black"
}
}
]
}
]
}
]
}