Forum Discussion
ezflow
Nov 01, 2024Copper Contributor
Formatting Multiline Text fields in SPO Library
I have a multiline text column (In a library, not a list) that contains text that has characters such as , { and } that I would like to remove. each, I want to be replaced with a line break and remove characters such as {} or replace with a space. My code seems to only work on the first instance of these characters. I would love to get idea or suggestions as I know there are limitations around Multiline Text fields.
My Code:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"style": {
"white-space": "pre-line"
},
"txtContent": "=if(@currentField, replace(replace(replace(@currentField, ',', '\n'), '{', ''), '}', ''), '')"
}
No RepliesBe the first to reply