Questions tagged [column-formatting]
This tag is used for the questions related to the column formatting using JSON in SharePoint Online, SharePoint 2019, etc.
321
questions
1
vote
1
answer
20
views
Issue in column formatting in SharePoint JSON with If statement
I have a simple JSON formatting code for a column in SharePoint in order to redirect to the appropriate target depending on the content of the record.
Here is the code:
{
"$schema": "...
0
votes
1
answer
9
views
execution flow button in a SPO library
I have created an SP document library with an execution flow button that extracts the zip files when the users click it. The extract file locations are the same as the zip file in the document library....
1
vote
1
answer
55
views
How to get lookup column value in single line of text
I Want to display lookup column values in single line of text. ProductName lookup column with multiple selection. I tried using JSON column formatting but values are not showing. Please can anyone ...
0
votes
1
answer
26
views
Column Formatter using (File) Name field
Simple question so it seems, but I'm trying to set the Title value of a doc library base on the File Name in the column Formatter.
Is this possible?
The source below gets wiped out from the Title ...
0
votes
0
answers
12
views
How to remove or re-wording prefilled text in the SharePoint column
Can someone please help me to see if I can remove or re-word the prefilled column text?
0
votes
1
answer
25
views
SharePoint List - Modifying center alignment always changes vertical alignment to top
I am trying to use JSON formatting to center align the values in a SharePoint List. Whenever I apply the JSON column formatting, it also aligns the values to the top. Even when I then specify that I ...
2
votes
2
answers
64
views
JSON code for SharePoint List conditional formatting - check for value in a single line text cell
I don't know any JSON at all, I work at an IT help desk and am trying to do a little advanced conditional formatting for our SharePoint list, which contains a user database of sorts. We're currently ...
1
vote
1
answer
37
views
SIMPLE Column formatting in SharePoint list (SP2019)
I have a pretty basic SharePoint list on a page at work and I simply want columns to be colored yellow (Is it "#ffff00" ?).
In my "List Settings" I select the column I would like ...
0
votes
1
answer
24
views
SPO JSON - Copy Multiple People Field Emails as Text in New Text Field Commas Separated
Based on this great solution, I am looking for JSON column formatting to copy a multi-person field (people picker), displayed as email
into a text field
displayed as raw text email format
comma ...
0
votes
1
answer
61
views
JSON Formatting to show last item select from multi selection choice field
I'm trying to create a new field that displays the last item select from another Multi selection Choice field. We currently use a choice for Portfolio Years which show as a string of values selected.
...
0
votes
1
answer
43
views
Specify the choices of the choice column in the JSON-code
I have a Choice column in my SharePoint list, with these column choices set:
Niet verzonden
Aangevraagd
Goedgekeurd
Afgekeurd
What i am trying to accomplish is to create a button from that Choice ...
0
votes
1
answer
30
views
How to turn the column choices into a button?
What I would like is to create a button from the choice column. So the user can not select a choice by himself. But triggers a power automate flow by pressing on the button. So how can I turn a choice ...
0
votes
1
answer
29
views
JSON doesn't show the names of the choices in the choices column?
I have json code set for the choice column which is also a button.
My code doesn't display the names of the choices! What do I do wrong:
{
"$schema": "https://developer.microsoft.com/...
1
vote
1
answer
24
views
Using JSON to list lookup values on separate lines
I currently have the JSON below and want to adapt it so that any multiple values are shown on a separate line, whereas at present each value is separated by ";"
{
"$schema": &...
0
votes
1
answer
32
views
How can I only show the profile picture of a user (and not his name) in a sharepoint column?
How can I only show the profile picture of a user (and not his name) in a SharePoint column?
I have set the column Person to only picture. but still get the name with it.
I have found a JSON code ...
0
votes
1
answer
72
views
SharePoint Online - Generate an icon via Column Formatting?
I have a list in SPO with a Choice column (Video, Word, PDF). I would like to display an icon in a column called FileType.
I have tried to customize the JSON of the FileType Column but it just shows ...
2
votes
2
answers
150
views
SharePoint List JSON Conditional Format of Date Column When # days passed
I've went through a bunch of questions trying to find the answer to my questions, but a lot of recommendations don't quite fit into the code that I have. I'm using the formatting that SharePoint ...
1
vote
1
answer
58
views
SharePoint JSON email attachment
Is there anyway to add an attachment to Outlook using mailto: in JSON?
For example, I have a list that has an attachment. I have a email template that opens in one of the columns using JSON. I am ...
1
vote
1
answer
75
views
SharePoint JSON hyperlink text in email
I have a list that has a combination of numbers. In one of the columns for that list I am writing JSON code that pops up outlook with a set template.
In the body of that template, I have the following:...
0
votes
1
answer
93
views
How to show a base64 image using JSON formatting?
I tried the following, but SharePoint seems to dislike the :
{
"elmType": "img",
"attributes": {
"src": "='data:image/png;base64,'+[$IconAsBase64]&...
0
votes
0
answers
37
views
How can we add site URL, item id and library to SharePoint list button using JSON?
How can we add site URL, item id and library to SharePoint list button using JSON?
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",...
0
votes
1
answer
91
views
Possible to use custom formatter in tile view?
I have a library that uses Document Sets and there are columns on the document set content type.
I want to display them in a view that uses the Tile format like this:
I use the JSON column formatting ...
1
vote
1
answer
372
views
SharePoint List JSON formatting (make a text look like a Choice Pill)
Is it possible to make a number column appear like a Choice pill? Instead of the value being in a rectangle box, it would display with rounded corners.
Instead of this:
Get the numbers into ...
1
vote
1
answer
23
views
SharePoint formatting date column
I am having an issue when trying to format my date column on a list.
I want the background color to turn red if the date is less than or equal to Today – 10 days, else its green.
I cant see how to ...
0
votes
1
answer
55
views
Create multiple hyperlinks in text column of library
I am trying to create a column in a document library that contains multiple hyperlinks.
Unfortunately it's not possible to have a rich text column in a Document library (unless I'm missing something?)....
2
votes
1
answer
158
views
JSON formatting of image
I'm having difficulties getting my list to display as intended. Can anyone help please?
I have a list, and one column is a calculated field which points to a JPG file. These are A4, scanned at 300dpi. ...
1
vote
1
answer
40
views
Editing column format when JSON is not valid
New to SharePoint so I hope I'm not doing anything silly, but I tried to edit a column format using JSON. It was working, and then I added an addition IF statement.
I messed it up and now it only ...
1
vote
1
answer
47
views
SharePoint list formatting clickable link
I've create a SharePoint list with clickable image from a link column, more info over here: SharePoint list formatting image column with clickable link from another column
Now I'm trying to fix an ...
0
votes
1
answer
136
views
Concatenate URL and Text into Hyperlink
I need help to concatenate [SiteURL] with "_layouts/15/AppRegNew.aspx" and have the column be a clickable hyperlink.
From the MS Column Formatting page, I need the href to be a column [...
1
vote
1
answer
183
views
SharePoint list formatting image column with clickable link from another column
I've got a SharePoint list with a Image and Hyperlink column. Now I'm trying to make the Image clickable with the Hyperlink column. I've came up with the setup below, but unfortunately I get about:...
1
vote
1
answer
160
views
Conditional Formatting for Null Values
I am having trouble to add a statement for if a value is null in my sharepoint list. Currently this is the code I have that is working:
{
"$schema": "https://developer.microsoft....
1
vote
1
answer
288
views
Creating a Link to Filtered Document Library using JSON Column Formatting
I have a SharePoint Online list and a document library. Within the list, there is a Lesson Name column (Title is internal name). I'm trying to add a column (to the list) that includes a link to the ...
0
votes
1
answer
93
views
IF/THEN for Conditional Formatting: Only Highlight IF Status Column = Open
I have a list with a Status column and a Due Date column. I have the below JSON that highlights the Due Date column either red, yellow or green based on the relation to today's date. However, I really ...
0
votes
1
answer
87
views
Replace operator not working on JSON column formatting
I'm trying to extract the account part of email in a person column ("created by" or Author). I want to the account part so I can concatenate a text for form an URL, such as http://somesite....
0
votes
1
answer
554
views
How to write JSON formatting code in column to wrap Title column by preserving existing functionalities?
As we know that there is no word wrap facility available in Title column in SharePoint list.
Although, we can add word wrap functionality by adding JSON code chunks.
{
"$schema": "...
1
vote
3
answers
189
views
SharePoint Column JSON If then nested Statement
The code below looks at my Client Number Field and if its greater then 5000, it concatenates and creates a hyperlink to a Jira item. This is working correctly. I need to add a "Then" ...
1
vote
1
answer
323
views
How to automatically load URL image link without using edit grid view
I have a SharePoint list that contains image URLs, the type is "Multiple lines of text"
They asked me to show the URL as an image and I followed the solution here:
In a Sharepoint List: ...
0
votes
3
answers
952
views
JSON: InlineEditField for choice columns
When using the JSON function "inlineEditField" for a choice column I can click the entry in the list and then it dissapears. Afterwards the value is cleared.
My code is:
{
"$schema&...
0
votes
1
answer
65
views
JSON Formatting - mailto - cc address isn't working
I'm trying to include a cc address for my item list email link.
I used this:
"href": {
"operator": "+",
"operands": [
"mailto:",
...
1
vote
1
answer
504
views
Can I use JSON to format column height and width in a list with hyperlinks?
I am using JSON to format the height and width of my columns in a SharePoint list.
Some of these columns are set to be hyperlinks or advanced rich text. When I apply the JSON formatting, it takes the ...
1
vote
1
answer
468
views
Trying to format based on a due date that is between today and 5 days from now
I'm trying to set up conditional formatting on a List for Due Dates (SharePoint online).
I can't seem to get the correct code for Due Date is between today and 5 days from now. If I use an arbitrary ...
0
votes
1
answer
297
views
Wrap text in a column after a character (;) using JSON
Using this as a guide I've applied some JSON formatting to the column itself, via List Settings. This has helped, yet the column is still too wide. I'd like the text to go to a new line after a ';' ...
2
votes
1
answer
116
views
'Create Clickable actions' JSON formatting not working
I am using SharePoint 2019. I want to create a clickable action column like referenced in https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting#create-clickable-...
0
votes
1
answer
672
views
Formatting List Forms section Using JSON In SharePoint Online
I have formatted SharePoint online list form by using JSON. Now how can I set background color of whole selection or section heading like green or Red, for example Approval section background color ...
0
votes
1
answer
945
views
Click on Image to follow Link (JSON Custom Formatting)
I'm trying to set up custom JSON formatting with an image that is clickable to follow a link. I can display the image OK (using "elmType": "img"), and I can set up text that links ...
0
votes
1
answer
358
views
Auto populate SharePoint column from Active Directory
I have a SharePoint list with a column called 'Name' (Person/Group type) where you can select a name from Active Directory.
I have then set up JSON formatting to auto populate the Email column. I'm ...
1
vote
1
answer
627
views
JSON Code to Display Different Background Colors
I've been reading a lot of questions and answers, and I still can't figure out how to get this to work, so I'll ask here.
I have a Microsoft Form that I've connected to my SharePoint list. One of the ...
2
votes
1
answer
107
views
Color coding Modified Date
I'm looking to color code the Modified column in Microsoft Lists. I know I need to use JSON but unsure of the code.
I would like it to be green if less than or equal to 30 days, orange/Amber if ...
0
votes
0
answers
176
views
SharePoint SE column formatting - customRowAction, setValue
I've read that SharePoint SE now support custom row actions (feature update 22H2). I do have this update installed but still cannot get the CustomRowAction "setValue" to work. Still not ...
0
votes
2
answers
4k
views
SharePoint Date column - Format as dd/mm/yyyy hh:MM:ss
How can I format the SharePoint Date column to show value in this format: dd/mm/yyyy hh:MM:ss
I know that this can be done with JSON formatting but not sure what the right formatting is required?