Skip navigation

Monthly Archives: February 2009

If you’ve ever promoted a field from InfoPath to SharePoint you may have noticed that when working with repeating data you get some different options in the promotion property dialog than if you work with non-repeating data. The additional options are to store your data as First, Last, Count or Merge. First/last will show only the first/last value in the repeating table, count will display the total number of items and merge will take them all and slap them together one after another. The data looks great when you view the columns in a SharePoint list view, breaking each item onto its own line just as you would expect. If you try to work with that same data in a data view web part, however, you’ll notice that it scrunches all of you rows together and eliminates any line breaks.

What we want to do is to go from displaying our column data like this

image

to this

image

The key is to rely on the ddwrt XSLT extensions and wrap your selected element with the AutoNewLine function: “ddwrt:AutoNewLine (string(yourelementhere))”. Make sure you typecast it as a string or else you will get nasty xslt transform errors.

The resulting XSLT would look something like this:

<xsl:value-of select="ddwrt:AutoNewLine(string(@_x007b_70e17bba_x002d_be48_x002d_4f3f_x002d_ac0c_x002d_ebe359bebf49_x007d_))" disable-output-escaping="yes" />

MS has a summary of the ddwrt properties available here. Although the article refers to SPS 2003, the properties seem to hold true for WSS 2007 data views as well.

I hope this helps someone out there because there are not many clear references to this on the web that I could find!

When making changes to one of our browser forms I came across an issue where when I would switch views in the form, I would get the generic “the form has been closed” error with no description. Checking into the server logs I found this

02/13/2009 09:08:47.20     w3wp.exe (0x1158)                           0x1008    Forms Server                      Forms Services Runtime            82fp    Warning     Exception occurred during request processing. (User: server\dev, Form Name: , IP: , Request: http://server/_layouts/FormViewNotify.aspx?XmlLocation=/sites/ff/Formulations/032034.xml, Form ID: , Type: XmlException, Exception Message: There is an unclosed literal string. Line 1, position 898.)

I couldn’t find any problems in the form code or the xml schema so I hit google and found a hotfix that microsoft released for this issue. The kb is 949752 and you can get it here: http://support.microsoft.com/kb/949752. It solved my issue and the forms render fine when views are changed.

Strange issue I encountered today when upgrading my InfoPath form via forms services. If you have added any property promotion fields as part of this upgrade, they will not actually get promoted to SharePoint. The column did not appear. No data was promoted. So I checked my property promotion settings and the field I wanted to promote was in the list. What’s the problem?

Not sure really. Bug or undocumented feature? For some reason the form needs to be deactivated and then reactivated to your site collection in order for the fields to be properly promoted.

Follow

Get every new post delivered to your Inbox.