r/sharepointjson • • Jan 09 '25

Priority Bubbles Template

2 Upvotes

Added colored priority bubbles to a choice field according to choice values 1,2 or 3. (Or set your own)

https://pastebin.com/raw/hxkKTyR5

https://sharepointdashboards.com/images/gallery/gal-12.webp


r/sharepointjson • • Mar 31 '25

$FileLeafRef, $FileDirRef, $Name, and other "system columns" do not return any value.

3 Upvotes

(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 • • Jan 26 '25

SharePoint JSON Training: Hyperlink Button

6 Upvotes

Learn how to code SharePoint JSON step by step. This module teaches you how to turn your hyperlink field into a clickable button:

https://sharepointdashboards.com/json/#hb


r/sharepointjson • • Mar 23 '25

Edit + View Buttons Combo

10 Upvotes

Template which adds both Edit and View buttons in one column as shown:

https://imgur.com/a/PPaIWe7

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

https://sharepointdashboards.com


r/sharepointjson • • Jan 15 '25

SharePoint JSON Training: Inline Edit Field

1 Upvotes

Learn step by step how to code JSON. This module shows how to write code for an Inline Edit Field.

https://sharepointdashboards.com/json/#ie


r/sharepointjson • • Jan 24 '25

SharePoint JSON Training: Library Thumbnails

5 Upvotes

Learn how to code SharePoint JSON step by step. This module teaches you how to add thumbnail preview images for files in a library:

https://sharepointdashboards.com/json/#lt


r/sharepointjson • • Jan 15 '25

Time duration calculation

3 Upvotes

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 • • Jan 09 '25

Flow Button Template

5 Upvotes

Create a button which triggers a flow directly from the SharePoint list view. Insert your own Flow ID into the code.

https://pastebin.com/raw/cc8rSLD1

https://sharepointdashboards.com/images/gallery/gal-7.webp


r/sharepointjson • • Jan 22 '25

SharePoint JSON Training: Choice BG Colors

5 Upvotes

Learn how to code SharePoint JSON step by step. This module teaches you how to conditionally change the background color for a choice field:

https://sharepointdashboards.com/json/#cb


r/sharepointjson • • Jan 25 '25

SharePoint JSON Training: Star Rating

4 Upvotes

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:

https://sharepointdashboards.com/json/#sr


r/sharepointjson • • Jan 16 '25

Column formatting question

4 Upvotes

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 • • Jan 21 '25

SharePoint JSON Training: Date Input

1 Upvotes

Learn how to code SharePoint JSON step by step. This module teaches you how to add a date input field with increment buttons:

https://sharepointdashboards.com/json/#di


r/sharepointjson • • Jan 09 '25

View Button Template

5 Upvotes

Add a simple view button to your SharePoint list items which opens up the display form for that item.

https://pastebin.com/raw/4Q3q9GjL

https://sharepointdashboards.com/images/gallery/gal-2.webp


r/sharepointjson • • Jan 20 '25

SharePoint JSON Training: Row Formatting

4 Upvotes

Learn how to code SharePoint JSON step by step. This module teaches you how to format the styling of rows:

https://sharepointdashboards.com/json/#rf


r/sharepointjson • • Jan 09 '25

Hyperlink Button Template

5 Upvotes

Turn a hyperlink field into a nice looking clickable button with this template.

https://pastebin.com/raw/VQ2XSmQy

https://sharepointdashboards.com/images/gallery/gal-36.webp


r/sharepointjson • • Jan 09 '25

Menu Button Template

4 Upvotes

Add a button which opens the item context menu. (Instead of needing to click on ...)

https://pastebin.com/raw/gsH4queE

https://sharepointdashboards.com/images/gallery/gal-66.webp


r/sharepointjson • • Jan 09 '25

Date Input Template

3 Upvotes

Display an interactive date field which allows for inline edit and incrementing date using buttons.

https://pastebin.com/raw/8hnpaHcq

https://sharepointdashboards.com/images/gallery/gal-70.webp


r/sharepointjson • • Jan 09 '25

Inline Edit Field Template

3 Upvotes

r/sharepointjson • • Jan 09 '25

Email Button Template

2 Upvotes

Add a button which emails the corresponding user in a person field.

https://pastebin.com/raw/4KV17VAE

https://sharepointdashboards.com/images/gallery/gal-23.webp


r/sharepointjson • • Jan 09 '25

Choice Input Template

3 Upvotes

Add formatting and colors to a choice field according to selected values.

https://pastebin.com/raw/Aj2EY2G5

https://sharepointdashboards.com/images/gallery/gal-17.webp


r/sharepointjson • • Jan 09 '25

Starred Items Template

2 Upvotes

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 • • Jan 09 '25

Date Flags Template

2 Upvotes

Show dates with flag icons which change according to whether the date is upcoming, today or in the past.

https://pastebin.com/raw/2p2MAJAE

https://sharepointdashboards.com/images/gallery/gal-9.webp


r/sharepointjson • • Jan 09 '25

File Thumbnail Template

2 Upvotes

Display a small file thumbnail image next to files in a library.

https://pastebin.com/raw/vj62G6BN

https://sharepointdashboards.com/images/gallery/gal-5.webp


r/sharepointjson • • Jan 09 '25

Til Due KPI Template

2 Upvotes

Show the number of days until a due date or number of days past due date with highlighting.

https://pastebin.com/raw/ub946kZE

https://sharepointdashboards.com/images/gallery/gal-13.webp