0

I am new to this forum.

I have a list that has a choice field with about 20 options (each varying in length). I want to display each choice on a new line (text wrap).

Default View looks like this>

enter image description here

I would prefer it to look like this:

enter image description here

I heard that JSON formatting on the column might be able to achieve this but I have never used that before.

If you need more information let me know. Any help would be appreciated.

1
0

As you are using SharePoint Online, you can try using anyone of the below:

{
   "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
   "elmType": "div",
   "txtContent": "=join(@currentField, '\n')"
}

Reference: Organize multi-choice user inputs by separate line (not comma)

OR

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "children": [
    {
      "elmType": "div",
      "style": {
        "display": "block",
        "width": "100%"
      },
      "forEach": "choice in @currentField",
      "txtContent": "[$choice]"
    }
  ]
}

Reference: Rendering multi-value Choice fields vertically using JSON Column Formatting

Official documentation: Use column formatting to customize SharePoint

0

You could try this:

{
    "$schema":
    "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
    "elmType": "div",
    "txtContent": "=join(@currentField, '\n')"
 }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.