Forum Discussion
ard-qua
Aug 31, 2023Copper Contributor
Calculated column that combines all values from three columns into one with break line.
In Sharepoint, I create a calculated column that combines all values from three columns into one with break line. =[AOR 1:]&" "&[AOR 2:]&" "&[AOR 3:] The result is shown in one line. "AAA BBB CCC "...
Rob_Elliott
Sep 06, 2023Bronze Contributor
ard-qua you can do this by formatting the calculated column in advanced mode with some simple JSON. My columns are named First, Second and Third and the calculated column is named Calc. The formula for that column is =First&" "&Second&" "&Third and without the JSON column formatting it will put it all on the same line.
Format the calculated column in advanced mode, delete the JSON code that's currently there and paste in the following:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "=[$First]+'\n'+[$Second]+'\n'+[$Third]",
"style": {
"font-weight": "bold"
}
}
This is the result:
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)