Stop SharePoint Lists Being a Sea of Text (JSON Fix)
At a Glance
- Target Audience
- SharePoint Admins, Microsoft 365 List Managers
- Problem Solved
- Long text columns in SharePoint lists create unreadable 'seas of text', slowing scanning and navigation.
- Use Case
- Event submission lists, project trackers, or any SharePoint list with bios, descriptions, or lengthy free-text fields.
<h2 id="have-you-experienced-this-problem">Have you experienced this problem?</h2><ul>
<li>You want to save some data to remove a manual process</li>
<li>You save the data into a Microsoft 365 List or a SharePoint list (same thing but one looks nicer and is more portable)</li>
<li>The data you want to capture and store has some parts that are made up of a paragraph or maybe a bit of free text</li>
<li>When you look at your list, each row is half the size of the screen so you cant scan it quickly and easily</li>
</ul>
<p>You end up scrolling for ages to find the row you are looking for and some rows take up the whole screen.</p>
<p>One column of text with large rows containing a sea of text is overwhelming your eyes and it stops you using the list as you intended.</p>
<p>It’s distracting and make people feel like the list is a mess rather than a well organised set of data that will help streamline a manual process. </p>
<p>There’s a really easy solution to this. You don’t need to code or be super advanced to exploit it either. </p>
<h2 id="choose-the-column-in-your-list-where-you-have-lots-of-text">Choose the column in your list where you have lots of text</h2><p>I’ve used a list of submissions for our upcoming Intranet Insights 2024 event (register to attend for free). In it, the biography for a session is usually quite a lot of text. </p>
<p>So I can only scan one or 2 submissions time unless I have a large screen or stretch the column width as far as I dare. </p>
<p></p>
<h2 id="the-answer-apply-custom-formatting-to-the-column-using-json">The Answer : Apply Custom Formatting to the Column Using JSON</h2><p>I prefer to scan titles and then if I want to dig deeper, open up the text. Thankfully with help from a Collab365 Academy member (James Williams thank you!), a little guidance from AI and a few clicks, it’s super simple. </p>
<ul>
<li><strong>Open the Column Formatting Pane for the Column containing your sea of text</strong>:<ul>
<li>Click the column heading.</li>
<li>Select <strong>Column settings</strong> from the menu.</li>
<li>Choose <strong>Format this column</strong>.</li>
</ul>
</li>
<li><strong>Enter the JSON Format</strong>:<ul>
<li>Open Advanced formatting via the link at the bottom</li>
<li>In the pane, paste your desired column formatting JSON.</li>
<li>To preview the formatting, click <strong>Preview</strong>.</li>
<li>To save your changes, click <strong>Save</strong>.</li>
</ul>
</li>
</ul>
<p>Here’s how mine looks after adding this formatting</p>
<p></p>
<p>List popout</p>
<p>Below is the JSON I used. You only need to replace the Abstract column with your column name. You can customize this further based on your specific requirements:</p>
<blockquote>
<p>{“$schema”: “https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json”,”elmType”: “div”,”txtContent”: “=if([$<em><strong>Abstract</strong></em>] == ”, ”, ‘Read More…’)”,”customCardProps”: {“openOnEvent”: “click”,”isBeakVisible”: true,”directionalHint”: “bottomCenter”,”formatter”: {“elmType”: “div”,”style”: {“padding”: “10px”,”maxWidth”: “200px”},”children”: [{“elmType”: “div”,”txtContent”: “[$<em><strong>Abstract</strong></em>]”,”style”: {“padding”: “10px”}}]}},”attributes”: {“class”: “ms-fontColor-themePrimary”},”style”: {“cursor”: “pointer”}}</p>
</blockquote>
<h2 id="pro-tip">Pro Tip</h2><p>If you are new to using JSON or maybe less confident in creating the right syntax like I was, go ask AI. </p>
<p>Here’s an example prompt that I used to get to this position. I received not only step by step instructions but also the correct JSON. Feel free to use it for inspiration or maybe when you get answer to a question and need a little more help. </p>
<blockquote>
<p>Im looking to change the way my column of text displays where there is a lot of text in a row. I have been looking into JSON but have been given this advice on how to achieve a pop out box on top of a short piece of text. like a read more pop out. Can you give me step by step instructions on how to implement this for a SharePoint list column. Advice given: You can do this with JSON formatting using customCardProps and openOnEvent”</p>
</blockquote>
