Writing numbers comma separated in JSON
-
08-02-2021 - |
Question
Following a tutorial: SharePoint modern view formatting with JSON
I realized that formatting a column with numeric or currency values are shown like strings. In this case I have the "Price" column with a Currency value format, it's supposed to be showed like this (notice is separated with commas):
but after the JSON formatting, it is shown like this:
I want the values to be comma separated. This is the JSON part where I use the "Price" value:
{
"elmType": "span",
"txtContent": "Price",
"style": {
"display": "block",
"padding-top": "20px"
},
"attributes": {
"class": "ms-fontSize-l ms-fontWeight-semibold ms-fontColor-neutralPrimary"
}
},
{
"elmType": "span",
"txtContent": "='$' +[$Price]",
"style": {
"display": "block"
}
},
How can I make the value to be shown as numeric (with commas) and not like a string?
Thanks in advance!
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange