Forum Discussion
SharePoint Choice Column Conditional Formatting
Teresa145 you can't do this with a choice column, it has to be a calculated column. In your list click add column then scroll down and select See all column types. That will take you to the create column screen where you enter the column name and select Calculated (calculation based on other columns).
Your formula should be as follows (my Yes/No columns are called named Tickets, Bags, Transport and Hotel):
=IF(AND(Tickets=TRUE,Bags=TRUE,Transport=TRUE,Hotel=TRUE),"Completed","Not Completed")
This is a bit more advanced, but in case you were wondering, each of my Yes/No columns are formatted in advanced mode with the following JSON and the user clicks the toggle to select Yes or No:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"style": {
"display": "flex",
"width": "100%",
"height": "100%",
"align-items": "center"
},
"children": [
{
"elmType": "div",
"style": {
"display": "flex",
"width": "60px",
"height": "30px",
"border-radius": "15px",
"align-items": "center",
"flex-direction": "row",
"justify-content": "=if(@currentField , 'flex-end' , 'flex-start')",
"cursor": "pointer"
},
"customRowAction": {
"action": "setValue",
"actionInput": {
"YesNoColumnInternalName": "=if(@currentField , '0' , '1' )"
}
},
"attributes": {
"class": "=if(@currentField , 'ms-bgColor-greenLight' , 'ms-bgColor-blueLight')"
},
"children": [
{
"elmType": "div",
"style": {
"width": "18px",
"height": "18px",
"margin-left": "6px",
"margin-right": "6px",
"border-radius": "50%"
},
"attributes": {
"class": "ms-bgColor-white"
}
}
]
}
],
"inlineEditField": "@currentField"
}
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP UK (and classic 1967 Morris Traveller driver)