Why is this CHOICE element not getting assigned in my SharePoint Field definition schema?
Posted
by ccornet
on Stack Overflow
See other posts from Stack Overflow
or by ccornet
Published on 2010-05-07T20:02:37Z
Indexed on
2010/05/07
20:08 UTC
Read the original article
Hit count: 292
I defined a new field of the type "Choice" for my web application. It will serve basically as a pseudo-lookup as its contents are defined by the value of a Text field in a list. It is initialized with a dummy choice to begin with (I'm under the impression a choice field needs at least one choice when defined), which is replaced with a real choice later on. But for some reason, this dummy choice is never actually added to the choices! Below is the XML Schema for the field in question.
<Field ID="{ALICEH-ASFA-KEGU-IDLISTED}"
Name="ddlSystems" Group="Lookup Columns" DisplayName="ddlSystems"
Type="Choice" Sealed="FALSE" ReadOnly="FALSE" Hidden="FALSE" FillInChoice="TRUE"
DisplaceOnUpgrade="TRUE">
<CHOICES>
<CHOICE>BLANULL</CHOICE>
</CHOICES>
<Default>BLANULL</Default>
</Field>
Initially, I used a default choice of (a single space), but I changed it to
BLANULL
so that I can parse an actual word instead of a veritably empty string. Now, even after having uninstalled and reinstalled the feature with this field, I have a choice field that has (still a single space) as the only choice. Even more perplexing,
BLANULL
is actually listed for the default value in both the UI and the object model! What is causing this problem, and how can I circumvent it so that I don't have to manually set this dummy value each time?
© Stack Overflow or respective owner