locked
content type format change RRS feed

  • Question

  • I have SPO site, there is a specific content type that content type contains a column. That column must contain specific content in a specific format. The format currently required is xxx.xxx,xxx (nine digits, with a dot after the tree first digits and a comma before the last three digits.

    It is now need to allow three different formats: first two OR three OR four digits, then a dot, then three digits, then a comma, then three digits.

    00.000,000

    000.000,000

    0000.000,000

    Is it possible to allow three different formats? If so, kindly help on the same.

    Wednesday, July 6, 2016 12:48 PM

Answers

All replies

  • Hi

    you should use regular expressions

    Check these similar posts

    https://chrisstahl.wordpress.com/2011/02/06/validate-a-sharepoint-list-column-with-regular-expression/

    http://sharepoint.stackexchange.com/questions/36566/validate-a-sharepoint-list-column-with-regular-expression


    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

    • Proposed as answer by croute1 Friday, July 8, 2016 5:07 PM
    Wednesday, July 6, 2016 12:59 PM
  • You cannot enforce this format at the site column or its content type. You need to handle this in the new/edit forms where this column will be used. As said by others use regex validations in the forms.

    ---
    Rajesh
    rjesh.com| @rjesh
    You don't need to buy me a beer, if helpful just smile, vote, and mark it as answer.

    Wednesday, July 6, 2016 1:14 PM
  • Hi S Manikandan,

    I have done a test in my SharePoint.

    I have a column named test and I set the column validation like the following:

    =OR(AND(NOT(ISERROR(SEARCH("??.???,???",test,1))),LEN(test)=10),AND(NOT(ISERROR(SEARCH("???.???,???",test,1))),LEN(test)=11),AND(NOT(ISERROR(SEARCH("????.???,???",test,1))),LEN(test)=12))

    Then the column can be like the following format:

    Note: change the "test" to the name of your column.

    Reference:

    http://techtrainingnotes.blogspot.sg/2015/10/sharepoint-column-validation-examples.html

    If you want to strict it to digits, you can use:

    CODE(MID([test],1,1))>47), (CODE(MID([test],1,1))<58) 

    Refer to the following article:

    https://www.premierpointsolutions.com/training/help-and-how-to-articles/how-to-validate-strict-text-formats-in-sharepoint-2010/

    Best Regards,

    Lisa Chen


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Thursday, July 7, 2016 6:58 AM
  • Hi S Manikandan,  

    Is there anything update?

    Please remember to mark the reply as an answer if it helps.

    Have a nice day!

    Best Regards,

    Lisa Chen


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Friday, July 8, 2016 10:17 AM
  • Lisa thank you so much :)

    it worked 

    Monday, July 11, 2016 2:05 PM