views:

91

answers:

1

Hi, following this MSDN article a CHOICE Element in a field declaration for SharePoint should have a Value attribute.

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.

My current implementation looks like the following and doesn't work:

<CHOICES>
      <CHOICE Value="Offen">open</CHOICE>
      <CHOICE Value="Duplikat">duplicated</CHOICE>
      <CHOICE Value="In Bearbeitung">inprogress</CHOICE>
      <CHOICE Value="Nicht vorhanden">unavailable</CHOICE>
      <CHOICE Value="Erledigt">finished</CHOICE>
</CHOICES>

VisualStudio 2010 claims, that no schema information for this attribute is found. Has Microsoft forgotten to implement this or do I understand something fundamentally wrong?

A: 

Gotcha: http://msdn.microsoft.com/en-us/library/ms439235(v=office.12).aspx

Reading this, you might be led to believe that you could create a CHOICES collection like this to have SharePoint use value codes on the back-end of its DropDownList's options tag in HTML. Like this:

Maryland Delaware Virginia Pennsylvania

Well, you'd be wrong. In fact, as nearly as I can tell, the Value attrbiute of this element does nothing at all. It's not invalid if you use it; it doesn't break anything; it just doesn't do anything. And, the documentation leads you to believe that it should, which I think has the potential to cause a huge waste of time.

If you want a value that is different than the text, here's the right way to do it.

MD#;Maryland DE#;Delaware VA#;Virginia PA#;Pennsylvania MD

Originally posted as a blog-rant at http://thomascarpe.com/Lists/Posts/Post.aspx?ID=26. I'll update mine if you update yours. :-)

Thanks to Doc WattsMan for this explanation!

yan.kun
Outch this is also wrong. The truth is: It is not possible. Answer from an Moderator of the Microsoft social Network: The documentation is wrong since SP 2007.
yan.kun