This topic has not yet been rated - Rate this topic

CHOICES Element (List)

Windows SharePoint Services 3

Used to define several choices within a field for a drop-down list.


<CHOICES>
  <CHOICE
    Value = "Text">
  </CHOICE>
  <CHOICE
    Value = "Text">
  </CHOICE>
  ...
</CHOICES>
Attribute Description

None

N/A

Minimum: 0

Maximum: 1

Within a CHOICES element, each CHOICE element contains a value that appears in the list.

Remember that CAML is case-sensitive; the CHOICE and CHOICES elements are in all capital letters.

This example defines a Choice field with three choices.

<CHOICES>
  <CHOICE>Not Started</CHOICE>
  <CHOICE>In Progress</CHOICE>
  <CHOICE>Completed</CHOICE>
</CHOICES>
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
How can we keep a condition on a choice field of Meeting Events NewForm.aspx
Hi Team,

I have a requirement that i have to add choice field column to with some values to the events of meeting workspaces.I have to allow the creation of new event with out any duplicates like EX:

I have Name,Event Date,End Date,Location,Meeting rooom(I have added column to the events list),If any one booked a meeting in the specific slot in specific room ,we donot want to allow others to book the same room in the same slot ,we have to display the custom message.

Please suggest how can i keep condition when the save and close of the newform.aspx

Regards
Ravishanker Maduri
Value Attribute Invalid
The documentation here states that you can use the Value attribute to assign a value to a choice item. This is incorrect. When you define the field in an XML file and install it as a feature, you recieve an error. This is because the WSS.XSD schema file used to validate the XML and used by Visual Studio to provide InteliSense does not have a definition for the value attribute.
Incorrect Documentation!

I just wanted to add my agreement with what TLingenfelder said above. I have searched high and low for a way to accomplish this (define Value attribute in a choice field xml definition file to be installed as a feature) but have yet to find a solution. Anybody with a work-around please post it here if you can.