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

Copper 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?

8 Replies

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

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

@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.

@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.

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.

@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.

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

Shrinika, your comment help me a lot figuring out how to format text in columns. Thank you !