Forum Discussion
VeeExcelLearn
Jun 22, 2022Brass Contributor
JSON SharePoint List Formatting - Card Showing Who Viewed and Edited
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?
- RobElliottSilver Contributor
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)- VeeExcelLearnBrass ContributorDo you have sample code perhaps? please and thank you?
- RobElliottSilver Contributor
VeeExcelLearn create a calculated column in your list to store the Modified column as text:
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:Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)