logo
search
SharePoint Document Issues

How to Use Numeric Fields in SharePoint JSON List Formatting

Guest WriterGuest Writer Oct 10, 2026 870 views

Question details

The user needs to configure SharePoint JSON list formatting to display specific medal emojis based on a numeric column and reformat a text-based name string.

How to Use Numeric Fields in SharePoint JSON List Formatting
Product
Microsoft SharePoint
Device & OS
not provided
Scenario
Customizing a SharePoint list view to accurately display rankings with emojis and properly format user profile names without overlapping conditions.
Observed behavior
Rules need explicit numeric comparisons in JSON if/else statements so that lower-ranked items do not accidentally trigger higher-ranked formatting rules.
Before you start

Verify that your target 'Sort' column is strictly configured as a 'Number' data type in SharePoint list settings before applying numerical JSON formatting.

Solution 1Recommended

Apply JSON Formatting with Explicit Numeric Comparisons

Use nested if-else statements in your SharePoint column formatting to explicitly compare exact numeric values to assign specific emojis.

When dealing with numeric values in JSON formatting, using exact equality operators ensures that conditions like 'third place' do not mistakenly evaluate as true for 'first place' rules.

1
Access column formatting

Open your SharePoint list, click the column header for your numeric 'Sort' field, select 'Column settings', and then click 'Format this column'.

2
Enable advanced mode

At the bottom of the formatting pane on the right side, click on 'Advanced mode' to input your custom JSON code.

3
Write exact comparisons

Input your JSON expression using explicit equality checks. For example, use the logic `=if([$Sort] == 1, '🥇', if([$Sort] == 2, '🥈', if([$Sort] == 3, '🥉', '')))` to map numbers to medals.

4
Save and verify

Click 'Save' at the bottom of the pane. Verify that the correct emojis now appear in the list rows according to their numeric rank.

Apply JSON Formatting with Explicit Numeric Comparisons
Logical Order: JSON formatting evaluates nested 'if' statements sequentially. Ensure your expressions are ordered logically, although exact equality checks (==) prevent most overlap issues.
Free Microsoft Office alternative

Manage Exported SharePoint Data Effortlessly with WPS Office

While SharePoint handles your online lists and JSON formatting, analyzing and formatting that data often requires exporting it to a spreadsheet. WPS Office provides a free, lightweight, and highly compatible alternative to Microsoft Office, making it incredibly easy to open, edit, and analyze exported SharePoint lists.

  1. 1. Export from SharePoint: In your SharePoint list, click 'Export' from the top command bar and select 'Export to Excel' or 'Export to CSV'.
  2. 2. Open in WPS Spreadsheet: Launch WPS Office, open the Spreadsheet module, and select the exported file to view your list data.
  3. 3. Analyze and Edit: Use WPS Spreadsheet's built-in formulas, conditional formatting, and sorting features to further analyze your ranked data.
Seamlessly open, edit, and format SharePoint list exports (.xlsx and .csv files).High compatibility with Microsoft Office formats, ensuring no data loss.Lightweight installation and lightning-fast performance for handling large data sets.Built-in advanced spreadsheet functions for offline data sorting, ranking, and analysis.Familiar user interface that requires zero learning curve for seamless migration.
QA img-9

Frequently Asked Questions

Why is my JSON formatting applying the first-place rule to third-place items?

This usually occurs if your JSON expression relies on greater-than or less-than logic incorrectly, or lacks explicit equality checks. To fix this, always use exact comparisons like `[$Sort] == 1` for specific rankings.

Where can I get advanced help for complex SharePoint JSON formatting?

You can post your JSON code and SharePoint column types in the Microsoft Q&A forums under the SharePoint tag. The Microsoft community and experts there can provide specialized assistance with advanced expressions.

Do I need coding experience to format SharePoint lists?

Basic formatting such as highlighting rows or changing colors can be done using SharePoint's built-in UI without coding. However, advanced customizations like evaluating numeric fields and manipulating text strings require a basic understanding of JSON syntax.