Forum Discussion
Get file download data
- Jun 29, 2025
RMDUser1 I was just looking at a list I created a couple of years ago and realised that what I did with JSON formatting could go some way to answering your question.
In the example below I have a hyperlink column called Link and a number column called ClickCount. When the user clicks the link it opens a document from a library. You can format the Link column in advanced mode with the following JSON which will add 1 to the number of times the link is clicked.
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "style": { "display": "=if(@currentField == '' , 'none' , '')" }, "children": [ { "elmType": "div", "customRowAction": { "action": "setValue", "actionInput": { "ClickCount": "= [$ClickCount] + 1" } }, "children": [ { "elmType": "a", "style": { "text-decoration": "none", "padding": "5px 10px 5px 10px", "font-weight": "bold", "border-radius": "5px", "font-size": "13px", "white-space": "nowrap" }, "txtContent": "@currentField.desc", "attributes": { "href": "@currentField", "target": "_blank", "class": "ms-fontColor-themePrimary ms-bgColor-themeLighter ms-fontColor-white--hover ms-bgColor-themePrimary--hover" } } ] } ] }
You need to have the ClickCount column visible in the SharePoint form for the JSON to work:
You could then have a flow to update a different list with the monthly totals and reset the number column to 0.
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)
RMDUser1 I was just looking at a list I created a couple of years ago and realised that what I did with JSON formatting could go some way to answering your question.
In the example below I have a hyperlink column called Link and a number column called ClickCount. When the user clicks the link it opens a document from a library. You can format the Link column in advanced mode with the following JSON which will add 1 to the number of times the link is clicked.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"style": {
"display": "=if(@currentField == '' , 'none' , '')"
},
"children": [
{
"elmType": "div",
"customRowAction": {
"action": "setValue",
"actionInput": {
"ClickCount": "= [$ClickCount] + 1"
}
},
"children": [
{
"elmType": "a",
"style": {
"text-decoration": "none",
"padding": "5px 10px 5px 10px",
"font-weight": "bold",
"border-radius": "5px",
"font-size": "13px",
"white-space": "nowrap"
},
"txtContent": "@currentField.desc",
"attributes": {
"href": "@currentField",
"target": "_blank",
"class": "ms-fontColor-themePrimary ms-bgColor-themeLighter ms-fontColor-white--hover ms-bgColor-themePrimary--hover"
}
}
]
}
]
}
You need to have the ClickCount column visible in the SharePoint form for the JSON to work:
You could then have a flow to update a different list with the monthly totals and reset the number column to 0.
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)
- RMDUser1Jun 30, 2025Brass Contributor
Rob_Elliott thanks! This actually may work fairly well for us as a quick snapshot of the activity! Thank you!