Search Results

Search found 1 results on 1 pages for 'unhipglint'.

Page 1/1 | 1 

  • How can I set the default value for a custom "Number" field in SharePoint?

    - by UnhipGlint
    I created a custom field for a content type I am creating using the XML below. <field ID="{GUID}" Required="False" DisplayName="Likes" Name="Likes" Type="Number" SourceID="http://schemas.microsoft.com/sharepoint/v3"><default>0</default></field> The field is meant to be used as a counter of sorts, and will be incremented programmatically. But, I can't get the value to default to "0" when a new item is created. However, for some reason, when I create a new column manually using the Site Collection settings page and configure it to default to "0" it works as it should. So far, I've tried the following tactics: I removed the "default" element from the field definition, and set the "DefaultValue" attribute on the content type definition. I exported a definition for the manually-created, working column (using an Imtech STSADM tool). Then, I added it to my field definitions XML and modified the IDs so that I could add it to my content type. When I did this, it still didn't work, even though it was exported from a working column! Any idea why this isn't working for me?

    Read the article

1