Display Numeric Fields Without Commas Using Validation Rules

Matt/ February 23, 2016/ Salesforce

When wanting to display a number field without a comma, I’ve generally made a number field then a formula text field to display the value as text:

TEXT (UN_or_NA_Number__c)

But that makes it ugly when you’re setting up the view and edit layouts.

Not any more!  I hadn’t considered this before, but why not just make a text field to begin with and use a validation rule to make sure the value is numeric?  Use this code to validate your field:

NOT(ISNUMBER( UN_or_NA_Number__c ))

This is so much nicer and easier to use than having to create duplicate display fields and managing the layouts.

Share this Post

About Matt

Matt McGuire is a Salesforce architect, AI builder, and punk musician based in Toronto. Canada's #1 certified Salesforce professional, 43× certified across architecture, development, AI, and a wide range of platform products. He's been building on Salesforce for 17 years and currently spends most of his time at the intersection of AI and the platform. The Music Intelligence Engine is his most interesting project to date. He thinks you should read the whole series.