r/sharepointjson • u/wwcoop • Jan 09 '25
Priority Bubbles Template
Added colored priority bubbles to a choice field according to choice values 1,2 or 3. (Or set your own)
r/sharepointjson • u/wwcoop • Jan 09 '25
Added colored priority bubbles to a choice field according to choice values 1,2 or 3. (Or set your own)
r/sharepointjson • u/jiminak • Mar 31 '25
(Cross posted from r/sharepoint by recommendation)
I'm trying my hand at some JSON column formatting for an SPO Document Library (modern). My main objective is to make PDF files open in Acrobat instead of the "sharepoint viewing experience" (or whatever it is called). I currently have this working by hyperlinking the "$Title" column, as long as my title is an exact match to the file name. BUT... when I try to use any of the suggested attributes to return the filename value, all I get is a "blank" (null, nothing is there).
So far I have tried $FileLeafRef, $FileDirRef, $ParentFolderLink, $Name. But none of these return any values.
Here is working JSON:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "a",
"attributes": {
"href": "='../' + [$Title] + '.pdf'",
"target": "_blank"
},
"children": [
{
"elmType": "span",
"style": {
"color": "#0078d4",
"text-decoration": "underline"
},
"txtContent": "[$Title]"
}
]
}This works perfectly for the href, as long as the "Title" column is a perfect match of the file name, since I can add the .pdf to the end. This obviously fails for any other file type, or if I fat finger the text over in the Title column.
If I swap in [$Name], or [$FileLeafRef], or any other attribute that should return something, the resulting URL is simply: https://redacted.sharepoint.com/SiteName/DocumentLibraryName/.pdf (simply nothing there).
I'm just a site owner, not part of our IT department. If there is something they need to do, I would need to know how to ask them.
r/sharepointjson • u/wwcoop • Jan 26 '25
Learn how to code SharePoint JSON step by step. This module teaches you how to turn your hyperlink field into a clickable button:
r/sharepointjson • u/wwcoop • Mar 23 '25
Template which adds both Edit and View buttons in one column as shown:
Create a calculated field called "Form" to use as a placeholder for the buttons. Format the column and paste in the provided code.
Code here:
https://pastebin.com/raw/QhDGa2Du
More free templates available at
r/sharepointjson • u/wwcoop • Jan 15 '25
Learn step by step how to code JSON. This module shows how to write code for an Inline Edit Field.
r/sharepointjson • u/wwcoop • Jan 24 '25
Learn how to code SharePoint JSON step by step. This module teaches you how to add thumbnail preview images for files in a library:
r/sharepointjson • u/[deleted] • Jan 15 '25
This is what I have attempted but it does not function as it should.
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmType": "div", "txtContent": "=floor((Number(@now)-Number([$DateHRNotified]))/10006060*24))" }
Any idea where I went wrong?
r/sharepointjson • u/wwcoop • Jan 09 '25
Create a button which triggers a flow directly from the SharePoint list view. Insert your own Flow ID into the code.
r/sharepointjson • u/wwcoop • Jan 22 '25
Learn how to code SharePoint JSON step by step. This module teaches you how to conditionally change the background color for a choice field:
r/sharepointjson • u/wwcoop • Jan 25 '25
Learn how to code SharePoint JSON step by step. This module teaches you how to add an interactive five star rating to a choice field:
r/sharepointjson • u/mtank91086 • Jan 16 '25
I have 2 columns; “Suspense Date” and a choice column - “Status”. Does anyone know how to make the “Status” column automatically switch to “OVERDUE” if the “Suspense Date” has passed?
r/sharepointjson • u/wwcoop • Jan 21 '25
Learn how to code SharePoint JSON step by step. This module teaches you how to add a date input field with increment buttons:
r/sharepointjson • u/wwcoop • Jan 09 '25
Add a simple view button to your SharePoint list items which opens up the display form for that item.
r/sharepointjson • u/wwcoop • Jan 20 '25
Learn how to code SharePoint JSON step by step. This module teaches you how to format the styling of rows:
r/sharepointjson • u/wwcoop • Jan 09 '25
Turn a hyperlink field into a nice looking clickable button with this template.
r/sharepointjson • u/wwcoop • Jan 09 '25
Add a button which opens the item context menu. (Instead of needing to click on ...)
r/sharepointjson • u/wwcoop • Jan 09 '25
Display an interactive date field which allows for inline edit and incrementing date using buttons.
r/sharepointjson • u/wwcoop • Jan 09 '25
Apply inline editing mode to a SharePoint field.
r/sharepointjson • u/wwcoop • Jan 09 '25
Add a button which emails the corresponding user in a person field.
r/sharepointjson • u/wwcoop • Jan 09 '25
Add formatting and colors to a choice field according to selected values.
r/sharepointjson • u/wwcoop • Jan 09 '25
Add a choice column which can store selectable icons for list items using these values:
None
Yellow Star
Orange Star
Red Star
Purple Star
Blue Star
Green Star
Alert
Arrow
Checkmark
Info
Question
https://pastebin.com/raw/Be6Ag5Zt
https://sharepointdashboards.com/images/gallery/gal-150.webp
r/sharepointjson • u/wwcoop • Jan 09 '25
Show dates with flag icons which change according to whether the date is upcoming, today or in the past.
r/sharepointjson • u/wwcoop • Jan 09 '25
Display a small file thumbnail image next to files in a library.
r/sharepointjson • u/wwcoop • Jan 09 '25
Show the number of days until a due date or number of days past due date with highlighting.