CHOICE element (List)
Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013
Used to define a choice within a Choice field.
<CHOICES>
<CHOICE
Value = "Text">
</CHOICE>
<CHOICE
Value = "Text">
</CHOICE>
...
</CHOICES>
Elements and attributes
The following sections describe attributes, child elements, and parent elements.
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 website 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>