Archive for the ‘Microsoft Office SharePoint Server 2007’ Category

Migrating Audiences to new installation

18. October 2009

….well seems like straight forward….but it isn’t. The content databases only contains information about the ID in your Shared Service Provider when targeting news in your site. So when creating a new audience in the new ssp with similar name and similar rules nothing will work.

A lifesaver is : http://audiencemigration.codeplex.com/ which actually exports your audiences with ID’s and rules to an xml file which is straight forward to install in your new farm. It is a WSP-file which you have to install in the farm, which extends the stsadm-tool with audienceexport and audienceimport.

Required fields in browserenabled Infopath forms

14. October 2009

Have you ever had to setup an Infopath form which had to be shown i a Sharepoint site with required fields? If you have you must have experienced the nasty red boxes that appears saying “Cannot be empty” and the red stars in the fields indicating that validation didn’t work out. In my case a web-designer called it a show-stopper, if the stars and the boxes couldn’t go away on required fields, so I have to figure how to make them go away and still make them required.

First of all I went away from marking the “Cannot be empty” checkbox since it gave me very little configuration for the validation-message, and instead I used the Data validation button in the textbox’s properties. Setting a validation here saying that the field could not be empty forced me to leave a validation-text, which again showed up in the red boxes in Sharepoint. DAMN.

Finally I ended up using the save as source files in the files menu to see excatly what was written in the manifest.xml in the xsn file. Opening the manifest.xml with notepad and search for the error gave me the following lines:

<xsf:customValidation>
  <xsf:errorCondition match=”/my:mineFelter/my:felt1″ expressionContext=”.” expression=”. = &quot;&quot;”>
   <xsf:errorMessage type=”modeless” shortMessage=”ERROR”></xsf:errorMessage>
  </xsf:errorCondition>
 </xsf:customValidation>

Simply deleting everything between ” and ” in the shartMessage property gave me what I was looking for. The field was validating, when it was submitted, but no red boxes and stars were shown :-)


Follow

Get every new post delivered to your Inbox.