Forum Discussion

geekcode0315's avatar
geekcode0315
Copper Contributor
Jan 30, 2024

Limit maximum characters in Sharepoint using Starts with

Hi,

 

Kindly assist if we can Limit maximum characters in "RequestID" Single Line of Text in SharePoint using Starts with - "RQ" = 10 characters and "OP" = 15 characters.

 

Thanks

  • geekcode0315 Try using column validation formula like below for your Request ID column: 

     

    =IF(LEFT([Request ID],2)="RQ",IF(LEN([Request ID])=10,TRUE,FALSE),IF(LEFT([Request ID],2)="OP",IF(LEN([Request ID])=15,TRUE,FALSE),TRUE))

     

    Note:

    1. Sometimes comma( , ) does not work in formula (it is based on language or regional settings on your site). So in that case use semicolon( ; ) instead of comma( , ).
    2. Use correct display name of your SharePoint columns in above formula.
    3. Wrap column names inside [] if your column name has space in it. For example: [My Column Name].

    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

      • ganeshsanap's avatar
        ganeshsanap
        MVP

        geekcode0315 You're welcome, I am glad it is working for you?

         

        Can you explain more about issue with "RQ"? Can you mention the steps you followed for testing "RQ" scenarios so that I can check & try to reproduce the same issue at my end?


        Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Resources