CHOICE Element (List)
Applies to: SharePoint Foundation 2010
Used to define a choice within a Choice field.
<CHOICES>
<CHOICE
Value = "Text">
</CHOICE>
<CHOICE
Value = "Text">
</CHOICE>
...
</CHOICES>
Attributes
Attribute |
Description |
---|---|
Value |
Optional Text. Specifies the display text for the choice. The value can be a reference to a resource in the format $Resources:String. However, choice values are not supported by the multilingual user interface (MUI). Choice values are initialized in the default language of the web site and do not change when a user switches to an alternate language supported by the site. |
Child Elements
None |
Parent Elements
Occurrences
Minimum: 0 Maximum: Unbounded |
Remarks
Remember that CAML is case-sensitive; the CHOICE and CHOICES elements are in all capital letters.
The CHOICE element contains the value within its body.
Example
The following example defines a Choice field with three choices.
<CHOICES>
<CHOICE>Not Started</CHOICE>
<CHOICE>In Progress</CHOICE>
<CHOICE>Completed</CHOICE>
</CHOICES>