Comparing SharePoint List and Form Library Forms
So you’ve heard about SharePoint list form customization in InfoPath 2010 and you’ve seen the cool demos. But you may be asking yourself – What’s the difference between list and library forms and when should I use one or the other? In this post, we will answer these questions and provide guidance on when to create list vs. library forms.
When designing InfoPath forms for SharePoint 2010, the first choice you need to make is between a SharePoint list form and a SharePoint form library form.
Recommendation
Use a list form if you just need to collect data and store it on SharePoint. Use a form library form if you want more advanced functionality such as complex or repeating data or code.
What are list forms and form library forms?
SharePoint list forms store data directly in a SharePoint list. Each control (e.g. text box) in the form is bound to a column in the list. SharePoint list forms are directly connected to the list, which means that you don’t have to worry about setting up the publish and submit locations.
Form library forms store data in XML files in a SharePoint form library. This means they are more flexible and you can do more with them. For example, they can be configured to save drafts and submit to different locations. However, they are more complex to work with and require more decisions to be made during configuration.
Because the way data is stored between these template types is different, it is not possible to switch between them.
Guidelines
Here are some basic guidelines to help you decide what type of form to design.
Use a list if:
- You want to quickly get started building InfoPath forms on SharePoint
- You need to use your form offline with SharePoint Workspace (formerly Groove)
- You want to filter your SharePoint list based on a person or group
- You would like to use the built-in display / edit views
Use a form library if:
- You have repeating or nested data
- You are working from a predefined industry or complex schema
- Your form needs to be digitally signed
- You need code in your form
- Your form is not hosted in SharePoint or you need to store results as an XML document
How can I build advanced functionality into my forms?
In general, form libraries provide better support for more complex and advanced forms. Here are a few examples of the way InfoPath can be used to build more powerful forms.
Repeating data or complex schema
- In some cases, you will want to collect repeating data in a form. For example, you have a project proposal form and want to include a list of potential risks for each project, or you have a book request form where users can request multiple books at once.
- If you have a schema that has any nesting or repeating structures, or a defined industry schema such as Dublin core or Health Level 7, form library forms will allow you to organize your fields into groups to match your schema as opposed to having to flatten your schema to work with a list.
- SharePoint lists store only one value per column; you can’t use list forms to store repeating data in a single item. As form library forms use XML to store data they can store repeating data in a single form.
Using repeating data in list forms
- If you have a SharePoint list form, you have several options for dealing with repeating data other than using the built in support of a form library.
- If part of your content is repeating, consider flattening that schema so that it can repeat. For example, you could limit your book request form to no more than ten books per form.
- You can also use multiple lists and link them together using lookup fields and web part connections. This works well for master/detail scenarios where one list tracks all the items and another contains the specific details for each item.
Using repeating data in form library forms
- Form library forms include controls that are designed to deal with repeating data inside the current item. Form libraries have built-in support for repeating data with controls such as plain list, bulleted list, numbered list, repeating table, and repeating section.
- They also support more customization of the form using the choice group and choice section controls. Advanced choice controls such as option button and optional sections are also available. All of these controls will be available by default in the controls gallery in InfoPath Designer for form library forms.
Digital Signatures
- Form library forms support digital signatures which will verify that a form has not been modified since it was signed.
- You can read more information about how to use digital signatures in these articles: Introduction to digital signatures and Digital Signature Support in InfoPath 2010.
Managed Code
- Form libraries support code-behind. This will allow you to do actions beyond logic in your form, such as advanced financial calculations.
- Code can be used to extend InfoPath functionality or create custom business logic.
- For example, in a pet food store you may use an InfoPath form to track food orders and use code behind the scenes to make sure you have enough inventory to meet the order and make sure that it isn’t sold before the form is submitted.
- For more detail about forms with code, see Introduction to Programming in InfoPath 2010.
Control over where your form is stored
- Form libraries allow you to choose the location of where your form XML is sent when the form is submitted.
- If you need to store your form as an XML document for use outside of SharePoint, then you should use a form library.
- For example, if you have an insurance questionnaire and you want to store the completed form in a document collection with related content, a form library will allow you to do this.
Bottom line
Overall, both list forms and form library forms support much of the key functionality that InfoPath provides, such as data validation, custom rules, default values, and control over visual layout. In most cases, a list form will be sufficient for your needs. Lists have the most straightforward design and form management experience. However, for more complex scenarios such as repeating data or the need to add code, a form library may be necessary.
Please leave a comment if you have any further questions!
Daniel Broekman and Kate Everitt
InfoPath Program Managers
Comments
Anonymous
May 07, 2010
Great post, thanks ! I know that I can't use Infopath List Forms to manage data that includes Managed Metadata. My guess is I could probably use Form Libraries, in conjunction with OOTB SP web services, to paliate. So it is probably another reason one would go with Form Libraries. It would be great to see a blog on that particular topic !Anonymous
May 10, 2010
Thanks for your comments. Managed Metadata Columns in InfoPath 2010 are supported in Document Information Panels only.Anonymous
May 30, 2010
In SharePoint 2007 (WSS/MOSS v3) we were only allowed to show flat data structures once the InfoPath form was published to a Form Library. has this restriction been removed/enhanced and now allows for nested data displays (how many levels)? Or, are we still left up to ingenious ways of showing nested data from the InfoPath Form (more than one set of nested data in the form)?Anonymous
June 01, 2010
In response to the previous comment from John Shaw, are you referring to promoting fields from the form as columns to the SharePoint library? If so, this functionality has not changed in InfoPath 2010. You can store nested data inside the form but nested values cannot be stored in SharePoint columns.Anonymous
July 09, 2010
Thanks very good explanation. I needed that. :) EdwardAnonymous
July 15, 2010
what about getting data from web services on a form , i suppose only form library forms can do it. any way great articleAnonymous
July 15, 2010
Both list and library forms support Web service data connections.Anonymous
August 04, 2010
Why in the world would the "option button" be unavailable for SharePoint list forms? All of my radio button fields get automatically converted to drop down lists, which is very frustrating! Is there anyway to use radio buttons in infopath without using a a form library?Anonymous
August 06, 2010
You can use option buttons in list forms by right-clicking any dropdown control and choosing Change Control -> Option button, but you’ll have to copy/paste the option button several times to get the correct number of choices, and you’ll have to manually set up the correct value for each option so the right value is saved to the list when the form is submitted.Anonymous
September 20, 2010
The comment has been removedAnonymous
November 16, 2010
Hi, I'm new to InfoPath and I'm currently using a form library for a simple form I've been working on. According to your checklist I think I can use a list instead, but I'm not clear on what is considered repeating data. I am using a repeating table to allow multiple attachments to be attached to the form. Does repeating table = repeating data? Thanks.Anonymous
February 14, 2011
Confusing!!! Am new to sharepoint and infopath.Please provide more explaination regarding this concept.It is very helpful to begineers like me.Anonymous
May 03, 2011
Great post. Thank you ! That's clear.Anonymous
June 06, 2011
The comment has been removedAnonymous
June 28, 2011
Why do forms not support managed metadata? Is this being considered or worked on?Anonymous
September 08, 2011
I have 'inherited' a form, linked to 1 Form Library (eg L1). We now need another library (L2) to use the same form, within the same site. Can I publish the same form to a new location, and STILL be able to publish it back L1? I understand it should be a content type (it probably will be on-going), but there is workflow running on L1 and we haven't presently the time to re-wire L1 to run off a specific content types. I therefore need to know that I can publish the form (to wherever!) and still be able to re-point the form back to L1. Note: there are 10 views in the form and 5 lookups to lists within the sites.Anonymous
October 02, 2011
Hi, I restriction to add: You cannot print an InfoPath form listAnonymous
October 16, 2011
The comment has been removedAnonymous
February 17, 2012
Wow! Exactly what I was hoping, but not expecting, to find! Thanks!!Anonymous
February 27, 2012
The comment has been removedAnonymous
March 08, 2012
Nice post.. I have one question for you.... Is it possible to convert list form to PDF format? Any help would be appreciated. Thank you.Anonymous
March 21, 2012
I wish I could be using the 2010 product, but alas, I cannot. So I am trying to populate a SP2007 list from a browser enabled InfoPath 2007 form. I already successfully set up a browser enabled form that populates a SP Forms library - but really need a list to be populated. Using this data at this link in the quest to populate a SP List from a web enabled InfoPath form, msdn.microsoft.com/.../cc162745(office.12).aspx I see that the use of CAML is required. I can't quite figure out what the role of the CAML XML file is. The data connection associated with the CAML XML file "Retrieves" data, but is that only because this write-up uses repeating tables? In my situation, I am not using repeating tables. What is the role of the CAML XML file when you want to populate a simple SP2007 "List" (not a SP Forms Library) from a web enabled InfoPath 2007 form? Thank you for any insight. Sorry to go retro, but its where I am.Anonymous
August 20, 2012
The comment has been removedAnonymous
August 20, 2012
Hi Mates, Is there any disadvantage / limitation for data which we use with form library instead of using list? Can we use form library in KPI & reporting?Anonymous
August 21, 2012
Thank you :) Your post is really helpfulAnonymous
September 10, 2012
The comment has been removedAnonymous
February 19, 2013
I normally use a SP list to create a form & then work on the design in InfoPath; however you can't print the form. Is there a way to include the print option in this type of form? ThanksAnonymous
August 14, 2013
Great post, exactly what I have been searching for. A bit confusing was the choice of List, Library or Formularlibrary. This post helps to decide what to choose.Anonymous
September 17, 2013
How can I include default title of form library in an infopath designed formAnonymous
September 17, 2014
Hi: I am a novice at SharePoint. We are using SP2010 OOB. Thank you for the much needed clarification in this Blog Post. However, I could use some guidance in the following scenario: I meet the following 3 out of 5 requirements for the form library Form: • You have repeating or nested data • You are working from a predefined industry or complex schema • Your form needs to be digitally signed However, portion of the data from this form needs to be saved in a list. Where such data from all the applications are grouped by its content Type, By its applicant and By type of the finding for each project and total costs are calculated, notes are added. And, the notes are followed up later for the update of the application. I plan to use the InfoPath 2010 form library form. However, can I keep all the information in the form and send some data to the list for further analysis/grouping at the same time? If I revise the form, would the retroactively the list data will get updated as well? Thank you for your guidance.Anonymous
September 24, 2014
Hi SRAEngineer, You can build functionality into your InfoPath "library" form to "submit" data to a SharePoint list. There is a separate blog post for that: blogs.msdn.com/.../submitting-to-a-sharepoint-list.aspx Adding new items to a list is not too difficult but "updating" an existing item will require more design work as you will need to know "what" the list ID is for the item you want to update. There are a LOT of comments on the post referenced above - I would encourage you to go through those as most of the "gotchas" in that process are spread throughout the comments. ScottAnonymous
November 05, 2014
Hi Scott: Question#1: Thank you for the guidance. This is extremely helpful. I will work on the solution next week. However the link you provided above has an example, where all the controls that they want to publish are grouped in one section. I just wondered if the controls of interest are spread all over the form, would the method still apply? or alternately, should the data be published in the library first and then create a list with the lookups? And, would the lookups column would have the same functionality as the regular list published columns? Question#2: How do I decide to choose from SharePoint 2010 Content Types versus Views for InfoPath Forms? Hi: I am a newbie to SharePoint/InfoPath. My first huge project has six applications that users can choose from and submit. Each has different metadata. Two applications are huge and have most columns identical and they have many (180+) controls, four applications are small (10 to 15 controls). I plan to submit InfoPath forms to a Form Library with important metadata published as columns (about 50) in the Form Library for large forms and publish all the metadata for the smaller forms. My question is: Should I create Content type for each form or should I create different InfoPath view for each form? All the selected metadata goes to one library. Thank you for your consideration. Regards,Anonymous
March 14, 2015
The comment has been removedAnonymous
March 26, 2015
I absolutely love your blog and find nearly all of your post’s to be precisely what I’m looking for. <a href="http://staygreenacademy.com">SharePoint 2013 Developer training Online</a>