Using JSON to format certain words as bold in a column.

Highlighted
Occasional Contributor

I am very new to JSON formatting, I've searched all over and can't seem to find a way to format certain words and phrases in a SharePoint column as bold. For example I'd like to add formatting to my Summary column to make it easier to read by making the words "Filename:", "Job Number:" and "Department:" bold. Is it possible, or can you only format the entire string?

7 Replies
Highlighted

Hi@Dylman3000 ,

You don't want to use JSON in this case. Simply you can use the format text under column heading in lists.

Shrinika_Atapattu_0-1598488455498.png

If there is not the way you want, I am sorry if I misunderstood your post.

 

Shrinika

Highlighted

Hi@Dylman3000 ,

 

Shrinika_Atapattu_0-1598494247292.png

I just tried this.You preferred things done, but there not work for multi-text contains. Because it takes as a single phrase in the SharePoint column.  If you want this code I'll share it with you.

 

Shrinika

Highlighted

@Shrinika_Atapattu  Thank you for your reply, I can't find or don't think I have that option for whatever reason, see attached, I am working entirely in SharePoint online. I have rule-based column formatting, but it doesn't give me the control I was hoping for.

Highlighted

@Shrinika_Atapattu Thanks again for this, if you can post the code I'd like to give it a go, but I am using a multi-line column so it doesn't sound like it will work.

Highlighted

Hi@Dylman3000 ,

When you edit your data there is option there. Select row>edit and you will appear edit list. Then your Summary data will appear with it. But make sure to select the 'use enhanced rich text' when you creating column. This is a basic way to do your requirement.

 

And sorry for the JSON code did not match with multi-line text. Sorry that I couldn't be of help much.

Highlighted

@Shrinika_Atapattu 

No worries, and thanks for trying. You taught me something today (enhanced multiline columns), that's a win!

 

Unfortunately my list is a document library, which doesn't appear to support enhanced columns. There is probably a better way of doing what I hope to achieve - basically all I want is a document library with a column for the thumbnail and column for all the associated metadata neatly formatted next to it, kind of like a visual library card for each item in the library.

Highlighted

Hi@Dylman3000 ,

 

Sorry that I couldn't help you. For reference, you can see these examples instead.

https://github.com/pnp/sp-dev-list-formatting/tree/master/column-samples

 

Good luck!

Shrinika