1

I am looking for a JSON query to format Currency column in SharePoint Online. Below query works but removes currency icon from the value.

{
  "$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json",
  "elmType": "div",
  "style": {
    "font-weight": "bold",
    "background-color": "yellow"
  },
  "txtContent": "@currentField"
}
1

What is the type of your field on which you are adding this JSON?

Currently Column/JSON Formatting will support only following column types:

Supported column types:

The following column types support column formatting:

  • Single line of text
  • Number
  • Choice
  • Person or Group
  • Yes/No
  • Hyperlink
  • Picture
  • Date/Time
  • Lookup
  • Title (in Lists)

The following are not currently supported:

  • Managed Metadata

  • Filename (in Document Libraries)

  • Calculated

  • Retention Label

  • Currency

Reference:

  1. Use column formatting to customize SharePoint.

Work Around:

If you want to concatenate currency symbol to numeric columns then you can use below JSON:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "div",
  "style": {
    "font-weight": "bold",
    "background-color": "yellow"
  },
  "children": [
    {
      "elmType": "span",
      "txtContent": "$",
      "style": {
        "display": "inline-block",
        "padding": "0 1px"
      }
    },
    {
      "elmType": "span",
      "txtContent": "@currentField"
    }
  ]
}

Reference:

Concatenate Currency Symbol to Numeric Columns.

  • Are you using number or single line of text field? and you want to concatenate currency symbol?? – Ganesh Sanap Jul 12 at 9:28
  • Does this answers your question? Is Yes, please accept it as an answer so that it will be easier for another users to find the correct solution. – Ganesh Sanap Sep 17 at 5:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.