SharePoint – InfoPath / Forms Library missing

Testing InfoPath, I try to do the simplest thing – publishing an InfoPath form to a SharePoint as a template, and allowing it to create a new library based on this template - I got this error:

The following computer running windows SharePoint Services does not contain the required InfoPath form template:
http://vm-spdev-xxxx/
A generic form template will be used instead

Warning: This is very bad

You should not continue – because if you do…

  1. InfoPath will create a new Document Library instead of a Forms Library and deploy the InfoPath file as a template in this document library. 
  2. It will appear as if everything’s working – you can do New –> InfoPath Form (as a document), fill it out and save it back to the list.
  3. And when you want to update the template it will complain that the default document isn’t based on a Form template.

    InfoPath failed to publish because the default content type in the document library is not based on the Form content type
  4. You got confused – you went to check the Library and sure enough it says the default content type is a Document
  5. You add a Form content type, and switch it over as the default content type… only to discover SharePoint now publishes two different sets of columns in this list – one set for Forms, another set for Documents.
  6. And it doesn’t appear as if the second publish worked…  I think this may be a different problem – because if I view as web page I see the new updated template

 

Instead, back out right now – delete that list in SharePoint and start over…  By the way… where’s – hmm where’s my Forms Library?

 

Went to site settings and activated:

  • Site Collection Features –> Office SharePoint Server Enterprise Site Collection features
  • Site Features –> Office SharePoint Server Enterprise Site features

No good, still no forms library.

More stumbling around, finally figured it out – I need to activate:

  • Site Features –> Team Collaboration Lists

Personally I didn’t think this was obvious – but I did know Forms Library is part of WSS…  so may be it made some sense.

 

Now go back to InfoPath again and try to publish.

Migrating from Windows Live Spaces to SquareSpace - outline

This is going to be a series of blogs, and hopefully release source code for getting your blog out of Windows Live Spaces.  I want to split this into two major sections, and then have a few trailing articles discussing the differences and things as I encounter them.

 

First Half: Export your blog data out of Windows Live Spaces

  • No export option
  • MetaBlogAPI – documented on MSDN
  • Export to some sort of format: XML?  MoveableType?
  • Cleaning the data
  • Exporting comments?

Second Half: Import your blog data into SquareSpace

  • Using a format that SquareSpace understands
  • Unhappiness with documentation – regarding DYI imports
  • Imported Blogs go under a new journal
  • Migrating content between journals

Extended Time:

  • Release code
  • Gotchas
  • Data cleaning
  • Pictures

Javascript - jQuery + ASP.NET – post-AJAX events

From jQuery, we get $(document).ready which is wonderful.
From ASP.NET, we get the UpdatePanel control which is fantastic.

 

One of the common problems that people have is regarding how to re-run the scripts after the UpdatePanel ajax update.

Here is one javascript-based solution – I consider these less intrusive than the code-behind solution with ClientScript.

Disclaimer – I learn this from previous projects I’ve worked on with personal experimentation – but I have not since read much documentation.

 

Original:

$(document).ready( function() {
$("a.link").css("border", "1px solid red");
})


The improved:

function setupLinkBorder( parentElement ) {
$("a.link", parentElement).css("border", "1px solid red");
}
$(document).ready( function() {
if (Sys &&
Sys.WebForms &&
Sys.WebForms.PageRequestManager &&
Sys.WebForms.PageRequestManager.getInstance()) {

Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(function(src,args){
setupLinkBorder(args.get_panelsCreated()); // when UpdatePanel are first loaded
setupLinkBorder(args.get_panelsUpdated()); // when UpdatePanel are loaded via AJAX
});
}
})



  1. Split out the actual script into a separate function
  2. Make sure you have a Sys.WebForms.PageRequestManager.getInstance() object – the code for this part was a bit scary.
  3. Add event handler to handle pageloaded event fired by ASP.NET (which occurs for UpdatePanel update as well)
  4. Rely on the parent element property of jQuery to limit jQuery selector to elements within the updated panel only.  This ensures you don’t fire the jQuery code on elements that are outside of the UpdatePanel – which can be bad.

SharePoint - ContentQueryWebPart, CommonViewFields and Multi-value choices

When you add a choice or lookup to the CommonViewField for a ContentQueryWebPart, if you had ticked the allow multiple-values checkbox, the CQWP will return you nothing.

Couple of people blogged about this:

http://sridharu.blogspot.com/2008/05/content-query-webpart-customization.html

http://blogs.msdn.com/ecm/archive/2006/10/25/configuring-and-customizing-the-content-query-web-part.aspx

Adri Verlaan [MSFT] even says:

Unfortunatly the data source that the CQWP uses does not support Mutli-Valued Lookups or Multi-Choice columns.

 

Turns out after a bit more digging around, you _can_ use multi-value choices.  To get multi-value choices to work, you need to use a different type:

Instead of Choice, use MultiChoice

<property name="CommonViewFields" type="string">MyDescription,PublishingHtml;MyTags,MultiChoice</property>

I have not had much luck with Multi-lookup and I suspect there might be some truth in what Adri was referring to.  If I consider how SharePoint might have to work with a field that contains multiple keys to a different lookup list, this problem becomes far more complex.

Anyway, at least it works for choice.

Have fun!

jliu