Forum Discussion

Tom2595's avatar
Tom2595
Copper Contributor
Jan 14, 2022
Solved

How to add in '%' after all values in a column in a Sharepoint list

Hi,    I have a list which has a column with scores in which is set to 2 decimal places, this column is populated with a Flow.    I would like all values to be formatted as 00.00%. How do I forma...
  • RobElliott's avatar
    Jan 15, 2022

    Tom2595 the JSON for adding a % symbol to each item in the column is:

     

     

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
      "elmType": "div",
      "txtContent": "=@currentField + '%'" 
    }

     

     

    What you will notice is that the JSON ignores the decimal place setting for the column, and if the column has a value like 14.20% it will drop the 0 and display just 14.2%. It's fine if the value is 8.75% for example. I've not yet found a good way to force it to  display the trailing 0.

     

     

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

Resources