Search code examples
sharepointsharepoint-2010sharepoint-2013

How to create a custom decimal format field?


I want to create a custom decimal format field in sharepoint with structure #####.#####. Example: If you enter 1.05 this field will return 00001.05000


Solution

  • I think you have 2 options there and indeed, the custom field is one of these options.

    In order to create a SharePoint custom field, you can follow this link : https://msdn.microsoft.com/en-us/library/bb417414(v=office.12).aspx

    Your needs is quite easy to develop. The most part is to learn how to manage a sharePoint custom field. In a custom field you'lle have two part :

    • The code behind which define you custom control and his logic
    • A definition in xml in order to declare your custom field and have the ability to use it in SharePoint

    The second option would be to calculate your desired format and write it in another column. You could program the logic to do this in a Workflow or in Event Receiver.

    I think the first option is the most appropriate.