JSON SharePoint List Formatting - Card Showing Who Viewed and Edited

Brass Contributor

Is there a way I can add some JSON coding that would allow me to hover over a SharePoint list to quickly see who editied and who viewed the SharePoint List line item?

4 Replies

@VeeExcelLearn you can see who edited an item with JSON code (or just display the Modified By column) but not who viewed it.

 

Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

Do you have sample code perhaps? please and thank you?

@VeeExcelLearn create a calculated column in your list to store the Modified column as text:

calcColumnModified.png

 

Then add the following list formatting:

 

{
  "elmType": "div",
  "style": {
    "font-size": "12px"
  },
  "txtContent": "@currentField",
  "customCardProps": {
    "formatter": {
      "elmType": "div",
      "txtContent": "='Modified by '+[$Editor.title]+' on '+[$ModifiedText]",
      "style": {
        "font-size": "12px",
        "color": "green",
        "padding": "5px",
		"height": "50px"
      }
    },
    "openOnEvent": "hover",
    "directionalHint": "Left",
    "isBeakVisible": true,
    "beakStyle": {
      "backgroundColor": "white"
    }
  }
}

 


 This is the result when you hover over the column:
SP-List.png

 

Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

Wow thank you guys. I will play with this code. You guys are wonderful. I reallly love the Microsoft Community such great people. :)