Define a custom format for a number field in a SharePoint content type

When I create a content type for SharePoint in XML in Visual Studio. Is it possible to create a field of type "Number" and provide it with its own format? I don't need a thousands separator, but for some reason I can't use the Integer type ...

EDIT: I tried this without success ...

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <!-- Parent ContentType: Element (0x01) -->
  <ContentType ID="0xMyId"
               Name="MyType"
               Group="MyGroup"
               Description="..."
               Inherits="TRUE"
               Version="0">
    <FieldRefs>
      <FieldRef ID="{5231bb5f-37c8-4ca8-b256-58337cfe82d3}" Name="Right_ID" DisplayName="Right ID" Required="TRUE" />
      <FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" Required="TRUE" />
    </FieldRefs>
  </ContentType>

  <Field ID="{5231bb5f-37c8-4ca8-b256-58337cfe82d3}"
         Type="Number"
         Commas="FALSE"
         Decimals="0"
         Name="Right_ID"
         Group="My Group"
         DisplayName="Right ID"
         StaticName="Right_ID"
         Hidden="FALSE"
         Required="TRUE"
         Sealed="FALSE" />
</Elements>

Maybe I should add that the target system has German culture, so the thousands separator. (period) no, (comma).

+3
source share
1 answer

, FALSE > . FieldRef .

EDIT:

, Commas Number .

MSDN ( ):

. NegativeFormat . int SQL.

. . . . Number : , Div, Max, Min, Mult Percentage.

, , :

  • Integer
  • , Number, .
+2

Source: https://habr.com/ru/post/1770544/


All Articles