JSON - Format value of a number column to specific number of characters

Sarah B 0 Reputation points
2023-03-01T21:02:20.7733333+00:00

Hello, I have a number column in a SharePoint list called "PO Number". The PO number is always going to be 10 digits in length. I want to format the field so that the user is required to enter exactly 10 digits, no more and no less. Any ideas on how to do this?

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Yanli Jiang - MSFT 31,666 Reputation points Microsoft External Staff
    2023-03-02T09:10:39.91+00:00

    Hi @Sarah B ,

    You can limit by column settings.

    03022

    In Edit column panel, scroll down and extend the More options, enter 1000000000 and 9999999999 for the minimum and maximum allowed values respectively.

    03023

    Then the data that needs to be entered must be 10 digits.

    03021


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Anonymous
    2023-12-12T22:31:37.16+00:00

    I was able to accomplish this by using the LEN function in column validation

    LEN([Field Name]))=10

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.