Forum Discussion
SP_Rambler
Dec 18, 2024Copper Contributor
How to stop SharePoint list custom column formatting affecting form display?
Hello, I am trying to apply custom formatting to a multi-select 'Choices' column in a SharePoint list. The custom formatting applies consistent capitalisation to choices, and joins them with a delim...
Dec 25, 2024
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"background-color": "=if(isBlank([$Emp_x0020_Returns_x0020_OF306]) || isBlank([$LP_x0020_Sends_x0020_OF306]), 'LightCoral', if((Number([$Emp_x0020_Returns_x0020_OF306]) - Number([$LP_x0020_Sends_x0020_OF306])) / (1000 * 60 * 60 * 24) <= 10, 'LightGreen', if((Number([$Emp_x0020_Returns_x0020_OF306]) - Number([$LP_x0020_Sends_x0020_OF306])) / (1000 * 60 * 60 * 24) >= 11 && (Number([$Emp_x0020_Returns_x0020_OF306]) - Number([$LP_x0020_Sends_x0020_OF306])) / (1000 * 60 * 60 * 24) <= 20, 'LightYellow', if((Number([$Emp_x0020_Returns_x0020_OF306]) - Number([$LP_x0020_Sends_x0020_OF306])) / (1000 * 60 * 60 * 24) > 20, 'LightCoral', '')))))",
"color": "black",
"padding": "5px",
"border-radius": "5px"
}
}
try this:
- SP_RamblerJan 06, 2025Copper Contributor
Unfortunately that's not done it - this looks to be adding colours to choices pills, I'm looking to manipulate the text to show proper case but without affecting the update form view. Is there a way to alter your code to achieve the desired result?
- Jan 06, 2025
add:
"style": { "text-transform": "capitalize" }or if it's the whole word:
"txtContent": "=toUpperCase([$Title])"
- SP_RamblerJan 07, 2025Copper Contributor
Thanks Nicholas, you will see from the original post that I have included the "text-transform": "captialize" styling. What I am looking for is a way to avoid this styling from affecting the edit form. Please see the original post for more detail.