Document Information Panel error – proppanel.xsn + view2.xsl (invalid)

I was recently looking into a problem with a Document Information Panel – within Microsoft Word.

There was an error being shown as the document loaded :

Document Information Panel cannot open a new form.
The form cannot be opened. To fix this problem, contact the form designer.
Form template: http://spr/proppanel.xsn
Document Information Panel cannot open the following view: [CONTENT TYPE] Properties – Server
The following view file is not valid: view2.xsl
The .xsl file is not valid XSL.
xsl:choose must have at least one xsl:when child.

 image

Within my SharePoint feature, I was deploying a few custom columns – one of these was a CHOICE field :

<Field ID=”{a75f81c8-a860-4967-996a-0f7941b81119}” Name=”SenderLocation” Group=”SPR Columns” DisplayName=”Sender Location” Type=”Choice” FillInChoice=”TRUE” />

This was intended for a user to add the name of a “Sender Location” – I didn’t actually know the initial choices – so I didn’t include them – but the “FillInChoice” would allow them to add values over time.   

** NB. The fields works OK (in the DIP) if you don’t specify “FillInChoice” (default = false).   The DIP won’t error – just no choices selectable.

Here in lies the issue – related to the fact that you have to specify the choice values.

When you create a field via the User Interface, you get an error – SharePoint Choice fields require at least one choice.

image

As it turns out, my CHOICE field deployed via ELEMENTS.XML didn’t have any choice values.

Thus – when Microsoft Word was trying to display from this column (within the DIP), it was error’ing.

Simple answer was to make sure it included “at least one” CHOICE value – via the UI – or via my original feature :

<Field ID=”{a75f81c8-a860-4967-996a-0f7941b81119}” Name=”SenderLocation” Group=”SPR Columns” DisplayName=”Sender Location” Type=”Choice” FillInChoice=”TRUE” >
  <CHOICES>
    <CHOICE>OTHER</CHOICE>
  </CHOICES>
</Field>

So, if you have this error, make sure you include some values in the fieldef URL – it makes sense if you think about it. 

NB.  It will only error if/when the field is specified as “FillInChoice = true”

Happy SharePoint’ing !

Advertisements

One thought on “Document Information Panel error – proppanel.xsn + view2.xsl (invalid)

  1. The popular the page using the links, greater inevitable that a
    person will edit it, treatment of links and then for any potential for gaining.
    This signifies that an online site cannot have an article on Wikipedia simply because it is the largest
    of their kind. * Create and distribute Widgets or Mash-ups
    using services like widgetbox, Open Social, or Yahoo Pipes.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s