The InfoPath team is busy working on the next version of Office. While we’re offline, we’d like to take the opportunity to tackle some of the questions that we get asked frequently by InfoPath users.
Today I’ll talk about how to migrate your InfoPath projects from Visual Studio Tools for Office 2005 or Visual Studio Tools for Office 2008 (VSTO) into InfoPath 2010 with Visual Studio Tools for Applications (VSTA).
The decision to remove the ability to include InfoPath projects in professional developer solutions has been a controversial one, but is consistent with our overall message about SharePoint development – Create InfoPath forms with as little code as possible, and put the bulk of your code into middle tier services and workflows.
That said, we frequently hear from users who invested in VSTO projects and need to know how to move those projects forward with InfoPath 2010 and Visual Studio 2010. Here’s how.
This walkthrough will demonstrate how to migrate InfoPath code projects from Visual Studio Tools for Office (VSTO), and into Visual Studio Tools for Applications (VSTA).
VSTA is an IDE included with InfoPath 2007 and InfoPath 2010. The VSTA node is included in InfoPath 2010 setup. Launch Office setup, choose to customize the install, and set Visual Studio Tools for Applications to ‘Run from my computer’.
After installing VSTA, make a backup copy of your VSTO 2008 project that you will now proceed to migrate.
Let’s walk through the conversion process of a VSTO 2008 project named “Hardware Order Form”. This project includes:
1. Custom classes used to create database connections and run queries. See DBConnection.cs.
2. External XML that are linked to the InfoPath data source. See Items.xml.
3. InfoPath form code. See FormCode.cs
4. References to non-default NETFW assemblies. See System.Windows.Forms and System.Data.
Here is a screenshot of the Visual Studio project explorer to give an idea of the project structure:
To migrate this project to VSTA
1. Launch Windows Explorer, and navigate to the InfoPath “manifest.xsf” for your project. This file is included in the “InfoPath Form Template” directory of your Visual Studio 2008 project by default.
2. You’ll see a list of files that directly correspond to the “InfoPath Form Template” directory shown in the VS Solution Explorer screenshot above. For example:
3. Right click “manifest.xsf”, and choose Design from the context menu
4. InfoPath 2010 Designer will launch.
5. Click the Code Editor button in the InfoPath 2010 Developer tab, and the browse dialog will appear
6. Click the Browse button, and navigate to the csproj file in the backup copy of your project. Select the csproj file and click ‘Open’.
7. VSTA will launch, and your project will be successfully migrated into InfoPath 2010 and VSTA.
You can now work from within InfoPath 2010 and VSTA to code, build, and publish your solution.
The less time it takes to fill out your forms, the more time your users can spend on other tasks. Also, odds go up that form fillers will complete forms when they take less time to fill out. This blog post will give you a few tips for speeding up form filling and improving accuracy so your forms are completed faster.
In this post we will cover
For questions where one answer is much more common than others, it can be useful to set up default starting values. The value you choose will appear when the form is opened, but the form filler is still able to change it.
You can set default values by selecting the control and clicking on the properties pane, and then choosing “Default Value”.
Let’s say I had a sailboat rental form, and when boats are rented employees need to fill out who checked out the boat, when it was checked out, what type of boat it was, the boat #, and customer information.
Because the sailboat rental place has mostly 24 foot boats, we can set the default Size to be 24 feet. Now employees won’t have to fill this field out most of the time. To set a default value, select the control (the boat size dropdown), choose the Properties tab, and select Default Value. Type the default value in the box provided. You can set the defaults for text boxes, combo boxes, check boxes and many other controls this way.
When a boat is being checked out, we need to log the person who checked it out and the date. Most commonly, boats are checked out for today’s date. We want to set the default value of “checked out by” date to be today’s date.
To set the checked out date to today, select the date control, go to the properties tab, and choose “default value”. Choose the function builder at the right .
Choose the “Insert Function” button and pick the now() function from the Date and Time Category. Click “OK” until you return to the form. Now, when users open the form today’s date will be automatically filled in. When using today() or now(), the form will update the date when you re-open it unless you uncheck the “Refresh value when formula is recalculated”. Make sure to uncheck this box.
today() and now() can both be used to set the default value of a date picker. However, the type of form you have can affect which one you use.
- Use today() when you have a date-only field.
- Use now() when your field requires a date and time.
In general, when using a SharePoint list form, use now(). When using a form library or filler-only form, use today(), unless you have changed the data format of the date field to date and time.
Setting the default value of the Person/Group picker is done through the fields task pane. Show the fields task pane by selecting “Show Fields” on the data tab and expand your Person/Group picker field (in my case, outBy). Click “Show advanced view” to see the detailed view. Right-click on the AccountId and choose properties.
Under default value, choose the function builder and type userName(). Again, make sure that “Refresh value when formula is recalculated” is unchecked, so that this rule is only run once and not every time the form is opened. Click Ok.
Repeat this process with the DisplayName (optional) to get the best experience. Now the people picker will default to the person who opens the form. When we load the form, the date, boat type, and checked out by fields are already filled out. With half of the fields completed, it will take employees less time to check out boats.
Hopefully, these tips will help you set good defaults and your users will spend less time filling out forms!
Kate Everitt
In the 2nd of 2 videos about InfoPath 2010 and SharePoint Workspace integration, Shirish Pulikkal from the InfoPath test team shows how to create and maintain an Asset Tracking list for both online and offline use, using InfoPath designer and SharePoint Workspace.
The Scenario: In the 1st video, Taking a list offline using SharePoint Workspace 2010, Shirish showed how to take a SharePoint Asset Tracking list offline in SharePoint Workspace. Smaller organizations with budget constraints may not have access to a SharePoint Server. In this video we show you how to create and maintain an Asset Tracking list for both online and offline use, using just InfoPath and SharePoint Workspace.
The Process: We use an Asset Tracking form and Categories form for the demo. Initially the Categories form is imported into SharePoint Workspace and we enable lookup to the list tool containing the Categories form. Next we design a new form for Asset Tracking from within SharePoint Workspace and add a SharePoint Workspace data connection to the Categories form. Then we import the Asset Tracking form in list tool in SharePoint Workspace, publish the tool and make the form available to other users subscribed to the workspace to create new list items. This is an example of a peer to peer scenario. The changes you make in your workspace will be immediately visible to other users subscribed to your workspace.
Hi, my name is Jill Anderson and I am a tester on the InfoPath team. In this post, I would like to introduce you to the one of the newest members of the InfoPath Object Model, the "ServerInfo" class. For InfoPath forms published to a SharePoint server, the members of this class give you context about that particular site. Documentation about this new class can be found at: http://msdn.microsoft.com/en-us/library/microsoft.office.infopath.serverinfo.aspx.
In this short video demo, I show you how you can use the members of this class to enable your form to submit data using a relative URL. This enables you to package a Site Collection as a WSP and move it to a new server. With these changes, the submit data connection moves to the new server as well.
To make sure that my form template was correctly associated with my SharePoint Form Library both before and after the Site Collection Migration, I published it as a Content Type (http://office.microsoft.com/en-us/infopath-help/create-a-sharepoint-library-or-site-content-type-for-your-form-template-HA010103005.aspx ). The ability to publish a Sandboxed Solution as a Content Type is a new feature for Office 2010.
Afterwards, I associated this content type with the correct SharePoint Form Library on the SharePoint Server. The steps to do this are as follows:
This is the code I used to relativize the submit to the SharePoint site.
/// <summary> /// Submits the form to the SubmittedTimeCards form library on SharePoint and calls a function to update the Vacation /// and Sick Balance for the employee. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">Provides data for the Microsoft.Office.InfoPath.FormEvents.Loading event.</param> public void FormEvents_Submit(object sender, SubmitEventArgs e) { FileSubmitConnection fileSubmit = (FileSubmitConnection)this.DataConnections["SharePoint Library Submit"]; // Refreshing the Total number of hours and total pay for this given form. this.CalculateWorkWeekHours(); this.CalculateTotalTypeHours(); this.CalculateTotalPay(); // Update the new Sick leave and Vacation Balance. this.DeductVacationAndSickPay(); // Relative the SharePoint Submit location to current SharePoint site. fileSubmit.FolderUrl = this.ServerInfo.SharePointSiteUrl.ToString() + "SubmittedTimeCards/"; fileSubmit.Execute(); // If the submit operation is successful, set e.CancelableArgs.Cancel = false; }
/// <summary>
/// Submits the form to the SubmittedTimeCards form library on SharePoint and calls a function to update the Vacation
/// and Sick Balance for the employee.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">Provides data for the Microsoft.Office.InfoPath.FormEvents.Loading event.</param>
public void FormEvents_Submit(object sender, SubmitEventArgs e)
{
FileSubmitConnection fileSubmit = (FileSubmitConnection)this.DataConnections["SharePoint Library Submit"];
// Refreshing the Total number of hours and total pay for this given form.
this.CalculateWorkWeekHours();
this.CalculateTotalTypeHours();
this.CalculateTotalPay();
// Update the new Sick leave and Vacation Balance.
this.DeductVacationAndSickPay();
// Relative the SharePoint Submit location to current SharePoint site.
fileSubmit.FolderUrl = this.ServerInfo.SharePointSiteUrl.ToString() + "SubmittedTimeCards/";
fileSubmit.Execute();
// If the submit operation is successful, set
e.CancelableArgs.Cancel = false;
}
For more information about creating and publishing Sandboxed Solutions see Phil Newman's post on Introduction to Sandboxed Solutions - Sort data in repeating tables using managed code Jill
In this video demo, Philip Newman and Christopher Brotsos from the InfoPath program management team show how you can use Team Foundation Server (TFS) to manage source control for your InfoPath forms with code.
Team Foundation Server (TFS) is an effective repository and source control program for your InfoPath solutions. Teams add InfoPath forms and their related Visual Studio Tools for Applications (VSTA) projects to TFS, and then proceed to collaborate on the overall solution. Form designers focus on adding controls, rules, and layouts to their local copy of a form while developers add C# or Visual Basic .NET code to their local copy of a form code project. Then, by using the TFS visual tooling environment, designers and developers can easily merge their changes together into a complete InfoPath solution.
There are, however, some best-practices that you should, and in some cases must, implement in order to be successful.
If your team plans to collaborate on an InfoPath solution, ensure all contributors work within a directory that everybody in the team can access via the same path. For example, use a common mapped drive, a UNC path, or as in the video, a local path that can be the same for all users of the project. In the video, we specifically used:
InfoPath’s default root directories, for XSNs and VSTA projects, fall under %USERPROFILE%. Because the %USERPROFILE% directory has a different name for each user, it will not be accessible through a common path for all those contributing to the project.
When you collaborate on an InfoPath solution, you should work with the XSN component files themselves, and not the XSN. When you add a control, rule, or new attribute to a form it is common for more than one component file in the XSN to be updated. If you work with the XSN, and not the component files, the template will be treated as a binary object. Most source control programs do not let you diff and merge changes to binary objects, and without this granular view/control of the XSN, you will not be able to successfully collaborate with your teammates.
To work with the XSN component files, setup the local workspace and save/export the files as follows:
It’s likely that your existing project is not already configured according to the requirements. So, make a backup of said project(s), and then change the configuration to support a shared design environment.
Before Philip and I opened the XSF in design mode, you saw us remove the read-only property from the %Project Directory% instead of executing a check-out in TFS to remove the TFS file lock. Executing a check-out in TFS is not best-practice when working with an InfoPath project because InfoPath 2010 needs access to all of the component files during design mode. Likewise, you also saw Philip execute an atomic check-out/check-in before he updated the repository with the date field and validation rule he added. TFS won’t let you check-in until you check-out, so the two commands should be executed in sequence in order to successfully check-in updated files. (Note: I didn’t check my code into TFS in the video, but if I had, I would also have executed a check-out followed immediately by a check-in).
Configure TFS to check-in your DLLs and PDBs. In a standard Visual Studio project, this isn’t necessary because DLLs and PDBs can be built dynamically at build-time. InfoPath also generates DLLs and PDBs dynamically, but it also lists said files in the template manifest. As such, if the DLLs and PDBs aren’t in the %XSN Components Directory% then the Designer will fail to open with a schema validation error.
Avoiding conflicts with the schema, control properties, and the layout of a form can be managed by maintaining the following best practices in your team:
Apache SVN works equally as well for collaborating on InfoPath form templates and their related VSTA projects. If the guidelines in this post are followed, your team can use SVN as a repository and source control management solution in the same way as Visual Studio Team Foundation Server. Each version control solution has its own benefits and caveats though, and you should evaluate each to determine which solution works best for your team. As an example: SVN doesn’t apply file locks to local copies of projects; its check-in/check-out paradigm differs from TFS. So, your team may find the file management aspects of SVN more intuitive and efficient. On the other hand, you will likely conclude that the CLI is the best choice for managing your project with SVN, and as such, you will lose the graphical/auto merge feature. Again, experiment, evaluate, and choose the solution which works best for your team.
InfoPath makes designing forms easy, and it provides you with a managed object model and access to the .NET Framework. This programmability support is available so that you can extend your forms into a variety of scenarios on the client and SharePoint. As your projects grow in size and complexity, you will find that using a managed repository is a quick and effective way for sharing solution amongst multiple developers and designers.
Hi there, Daniel Broekman here. After showing you how to customize a SharePoint list with InfoPath 2010, and describing the differences between SharePoint list forms and form library forms together with Kate Everitt, I’m back with a quick tip for easily sending a value from the browser’s query string into an InfoPath form.
Imagine one of the following scenarios:
In InfoPath 2007, you could accomplish these scenarios with code. With InfoPath 2010 and SharePoint 2010, there is a much easier way to send data from the query string into an InfoPath form. Let’s take a look.
Using a web part page and a part-to-part connection between a Query String (URL) Filter web part and an InfoPath Form Web Part (new in SharePoint 2010), we can easily pass a value from the browser’s query string into the form.
I’m going to assume you already have a list form published to SharePoint. I just created a simple form to collect feedback on a conference presentation. As you can see, I included a “Referrer” field that will track the referral source of users filling out my form.
To set up the rest of the scenario, follow these steps:
Everything should be set up correctly now. Save your changes to this page, and then navigate to the page. You should see the blank form.
To test that everything is working correctly, add “?Referrer=email” to the end of the URL, and you should see the Referrer field being populated with the value “email”.
That’s it! You now have a page that passes data from the query string into an InfoPath form, set up in less than 5 minutes, and without any code.
For more advanced scenarios, you can use this as a starting point. For example, you could have a rule on the “Referrer” field that performs certain actions based on the incoming value, such as querying a secondary data source, loading a specific item, etc. In the “customer invoice” example I gave at the beginning of this post, you could have an “onchange” rule on the “Customer” field that queries a secondary data connection for all of that customer’s invoices.
One final note: the InfoPath Form Web Part only supports one incoming part-to-part connection at a time, which means that you are limited to passing one value into the form using this method.
Please leave a comment to let me know how you’re using this functionality in your forms!
This week's cool form is an inventory check list form that is used in the Microsoft Company Store. The form contains 2 views.
The 1st view contains a set of checks that need to be completed by store employees.
The 2nd view displays the list of checks that have not yet been completed by the user.
If you have a “cool” form that you would like to share with us, please send an e-mail with the following details to coolform@microsoft.com -
The most popular submissions will be featured on our blog in future posts.
Check out other Cool Forms here.
In this short video demo, Shirish Pulikkal from the InfoPath test team shows how you can customize a SharePoint list in InfoPath designer and work with the list offline in SharePoint Workspace.
The Scenario: A fictitious company Fabrikam wants to track assets in their lab using SharePoint list. They want to be able to track assets both in the online and offline case. Fabrikam has decided to use InfoPath to customize the list and SharePoint workspace to enable working offline with the list.
The Process: We start by customizing the form for the SharePoint list in InfoPath designer and add a secondary data connection to pull data from another SharePoint list. Then we publish the form back to the SharePoint list and sync it in SharePoint Workspace. Now we can create list items while working offline in SharePoint Workspace and items can be synced to SharePoint server when we get back online.
Hi, Frank Mueller from the InfoPath development team here. The Multiple-Selection List Box (MSLB) control was introduced in InfoPath 2007 to enable users to select multiple items from a list when filling out forms. In this post, I will explain the different ways you can restrict and validate the data entered using this control in InfoPath 2010. I will also cover some advanced tips and tricks.
Data Validation
Special behavior in SharePoint List Forms
Removing Blank Default Values
First let’s look at a scenario where you may want to use the MSLB control. Say, for example, you are building a form for customers to order your company’s products. To be able to more effectively spend the company’s marketing budget in the future, the marketing department would like to know how your customers found the company’s web site. So you’ve added a Multiple-Selection List Box to gather responses to that question.
Your customers can now select one or more options. If a customer heard about the web site through a channel that is not specified in the Multiple-Selection List Box control, he/she can select the last checkbox and just type in a custom response.
The marketing department is pleased with the new order form, but many customers do not bother responding to the “How did you hear about us?” question. With InfoPath 2010, solving this problem is very easy.
In InfoPath 2010, there are two main ways that form designers can restrict and validate the data entered using the MSLB control.
New in InfoPath 2010, we can now enforce that users select at least one non-blank item by setting the “At least one selection required” property. In most cases, this is the setting that you will want to use.
When you preview the form, you will notice a red asterisk in the upper right corner of the control, indicating that a selection is required.
If you select a blank custom value, an asterisk will appear in the top right hand corner of the custom value text box.
All asterisks will disappear as soon as you select an option that is not blank, or you select the custom value text box and type in a value.
The new type of data validation is only applicable to repeating fields that are bound to Multiple-Selection List Box controls.
When setting the property at the field-level (instead of on the control), you will notice that it’s called “Non-empty occurrence required”. This is because the field can be bound to a control other than the MSLB, in which case users do not make selections when using the control.
You may set any repeating field to “Non-empty occurrence required”, but you will only see an effect when the field is bound to a Multiple-Selection List Box control. “Non-empty occurrence required” is not implemented as an XSD constraining facet, but rather as a special Validation Rule that is stored in the manifest.xsf of your form template. This has the benefit that you can set the data validation even if you are designing a form template based on a locked schema.
In most cases, the “At least one selection required” property will do you what you need to ensure that users enter the required data. In InfoPath 2010, we still support the legacy “Cannot be blank” property. When this property is set, it requires that every item that a user selects from the list has a value. It does not however require that users select an item in the first place. When you preview the form, you will notice a red asterisk, whenever you select the checkbox of the custom value text box. This indicates that if the user wants to select this option, a value has to be typed in the text box before the form can be submitted. Once you type some text in the custom value text box, the asterisk will disappear.
When a field in an InfoPath form is set to “Cannot be blank”, a minLength constraining facet is applied to the XSD element, which requires that corresponding XML nodes contain at least one character.
<xsd:element name="field1" type="my:requiredString"/> <xsd:simpleType name="requiredString"> <xsd:restriction base="xsd:string"> <xsd:minLength value="1"/> </xsd:restriction> </xsd:simpleType> This makes sense for text fields, when the form designer wants to ensure that the person filling out the form has to enter data into the field before it can be submitted for further processing. The Multiple-Selection List Box control is bound to a repeating field in the form’s data source. When the user fills out the form and makes selections in the control, a new XML node is created for each selection made. If you mark the repeating field that the control is bound to as “Cannot be blank”, InfoPath will ensure that all options selected or entered through the custom value textbox are not blank. However, if no selections are made in the control, no XML nodes are created, and hence the constraining facet of the field is not violated, and the user is not forced to make a selection.
When would I want to use “Cannot be blank” instead of “At least one selection required”?
If you want to ensure that users do not select any item that does not have a value then the “Cannot be blank” property can be used.
In the example below, both “At least one selection required” and “Cannot be blank” are set. The data is not valid because the custom selection is blank.
In the example below, only the “At least one selection required” is set. The data is valid because at least one non-blank item is selected.
In a SharePoint list, when you mark a Choice column as required, it requires users to select at least 1 item and for all selected items to have values.
Marking the field as required in SharePoint, has the same effect as setting both the “Cannot be blank” and “At least one selection required” properties in InfoPath. For consistency with SharePoint, when customizing a SharePoint list form in InfoPath 2010, only one data validation option, “Cannot be blank” is available.
When designing the order form described above, InfoPath will by default insert a blank default value node for each repeating field. As you preview the form you will notice that the custom value text box at the bottom of the Multiple-Selection List Box control will be checked by default.
If you wish there to be no default selection at all in the control, you need to remove the default value node.
Frank Mueller InfoPath Developer
This week’s cool form was submitted by Sean Cantellay of Cantellay Consulting. The form allows the user to select a SharePoint task from the right and view it in the form on the page. The task has been broken up into four views and the tab buttons moves the user through the different views. The user can also Escalate the task to another SharePoint group by clicking the Escalate button and selecting the group.
Click on images for larger pictures.
In this short video demo, Matt Bielich from the InfoPath test team shows how you can add a rating control to your InfoPath 2010 forms using picture buttons.
Hi, my name is Joey Wiggs and I’m a developer on the InfoPath team. In InfoPath 2010, one of the ways in which we've improved our integration with SharePoint Server 2010 is by providing richer capabilities for connecting to and getting data from SharePoint lists. In this post, I will compare SharePoint list data connections in InfoPath 2007 and InfoPath 2010, and discuss the benefits of using the new 2010 data connection type. I will also outline the steps required to upgrade your InfoPath 2007 SharePoint list data connections to the new and improved version.
Let’s start by looking at a scenario when you would use a SharePoint list data connection in an InfoPath form.
In Microsoft, when employees run into technical issues, they log a help ticket by filling out an InfoPath form. They start filling out the form by selecting an Problem category from a dropdown list. We could store the category names inside the form but that means that whenever a category is added, deleted or renamed, the form will need to be updated.
Instead, we can store the Category names in a separate SharePoint list and pull this information into the form when users are filling it out. We can do this by adding a SharePoint list data connection to the form. The benefit of using a data connection is that the data can be maintained separately in a single location and the form will always pull in the most up to date information from that location.
For example: By setting the “Modified by” query field to the current user (using the username() function), the query will return only those list items that were modified by the current user.
In previous releases, the number of items returned and the sorting order of said items were determined by the default view for the list in SharePoint. To work around this limitation, form designers had to go to the list settings page in SharePoint and modify the default list view to get the data they wanted into their forms. That’s no longer the case! The new 2010 list data connection will return all of the items in the list, regardless of the default view’s settings. You can also sort the incoming data by a particular field in the data connection wizard when creating a new connection, or modifying an existing one.
The new list features are supported in InfoPath 2010 filler and browser forms only, so if you want to use the new connection in your existing InfoPath 2007 form you will need to upgrade your existing forms to InfoPath 2010. However, once upgraded, InfoPath 2007 clients will not be able to open the form.
To upgrade the data connection, form designers must complete the following steps:
For each list data connection that retrieves data in your form, you will need to select it in the data connections dialog and press the “Convert to Current Version” button. You will be prompted if you want to continue. After conversion, you will see an information bar when that connection is selected stating that the data connection is incompatible with the current version of your form. That’s okay; we’ll be upgrading the form to the required version later.
After converting a data connection, you’ll need to rebind your controls and fix any field or XPath references inside rules and code. When rebinding, you’ll need to rebind the repeating sections to the d:SharePointListItem_RW group, then rebind the controls inside the repeating sections to the correct fields. You can rebind a control by selecting it, then right-clicking and choosing “Change Binding”. This brings up a dialog where you can choose what field or group to bind the control to.
Fixing your rules consists of finding the rule and updating any field references. Field references from the old adapter will look something like “@Title” after you convert your 2007 adapter to 2010. Select the reference, pick the field you want the rule to reference and away you go.
Once you’ve saved your form, you will be able to avail of all the capabilities of the new 2010 SharePoint list data connection. At any time, you can use the data connections dialog to modify the newly upgraded connection, to add new field types, or to use the sort by functionality. You can also set the value of query fields using rules in your form.
This week’s cool form is a form used to track the status of testing of feature areas. One interesting decision made in this form is to use questions as labels rather than field names. This makes the form much easier to understand, particularly given that field names for compactness in the list view tend to be only one or two words. Another key aspect of this form design is the use of ‘?’ picture buttons beside certain questions. Clicking one of these buttons provides detailed help text underneath the question. You can see an example of this text in the screenshot in blue. This technique of hiding detailed text until the user asks for it enables the form designer to get the best of both worlds, a form that is compact and easy to read as well as a form that provides enough detail to ensure it is filled out correctly.
The fourth and final session in the InfoPath 2010 Academy Live series, Best Practices in Form Design, by InfoPath PM lead Daniel Witriol takes place this Wednesday, May 5th at 8:30 AM (PST).
You can sign up for this free Web cast on https://www.eventbuilder.com/event_desc.asp?p_event=a2d1f10w.
If you’ve missed any of our earlier sessions, you can watch them on demand at the links below:
In this video demo, Phil Newman from the InfoPath program management team shares some tips and tricks for debugging InfoPath forms with sandboxed code on SharePoint server 2010.
Here is this link to the ULS viewer tool that is used in the demo:
Filters:
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.
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.
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
This week’s cool form is a feature request issue tracking list used by the Visio team. It’s divided into two main sections, the separate status section allows readers to jump directly to the information they care most about. It uses picture buttons to allow selection between ‘Office 14’ and ‘Office 15’ and to show which one is currently selected. This form also dynamically generates the proper direct link to the bug database based on the bug ID that is entered.
Check out the new Capacity Management Resource Center for SharePoint 2010 that went live when Office 2010 released to manufacturing last Friday, April 16th. The InfoPath capacity planning document along with a refresh of the Capacity Planning Tool Kit are now available.
The Capacity Management Resource Center contains resources to help you with capacity management in your Microsoft SharePoint Server 2010 environment—map your solution design to a farm size and set of hardware that supports your business goals.
Hi, my name is Laura Harrington, and I’m a program manager on the InfoPath team. In this short video demo, I will show how you can optimize the form filling experience for different tasks and users by creating multiple custom views in your customized SharePoint list forms.
Find the new locations of InfoPath 2007 commands in InfoPath 2010. The InfoPath 2010 menu to ribbon reference workbook contains tables that list the old menu commands and show where in InfoPath 2010 those commands are located.
This Excel workbook is now available to download from http://office2010.microsoft.com/en-us/templates/CL101817133.aspx.
Hi, this is Frank Mueller, a developer on the InfoPath team. In this post which is the first of two blog posts about the Person / Group picker, I want to tell you about the improvements we’ve made to this control in InfoPath 2010.
The Person / Group Picker (aka contact selector) control allows you to type or select users and groups from a SharePoint site, and validate those users against a directory provider. In InfoPath 2010, the Person / Group Picker control is now a 1st class citizen and is available out of the box in the controls gallery! With the new and improved person / group picker, we have eliminated the detailed steps required to insert and configure this control in your forms (the blog post outlining these steps has been one of our most viewed posts). In addition to making the control available in the controls gallery out of the box, we have added new features to improve its integration into SharePoint scenarios.
For information on how to upgrade InfoPath 2007 forms with Person/Group Picker controls to InfoPath 2010, click here.
From the Controls Gallery on the Home tab or the Controls task pane, click the Person/Group Picker to insert it into the view.
The Person/Group Picker needs to connect to a SharePoint site to be able to function. Specify the SharePoint site as follows, unless you have already published the form to a SharePoint site, in which case that site will be used.
In InfoPath 2010 it is now possible to mark the field the people picker is bound to as Cannot be blank. This means that users will not be able to submit a form without having entered at least one valid person or group in the control. You can mark a field as required by doing the following:
Preview the form in InfoPath Designer or publish the form to a SharePoint site and view the form, enter a name or logon alias, click the “Check Names” button and resolve the name! Alternatively, you can click the “Address book” button to perform a search if you do not know the complete name of the user.
For information on how to upgrade InfoPath 2007 forms with Person/Group Picker controls to InfoPath 2010, check out my other post here.
Hi, this is Frank Mueller again and this is the second of two posts that I’ve written about the InfoPath 2010 Person / Group picker control. InfoPath 2007 form templates containing the Person/Group Picker control (formerly named Contact Selector) will continue to work in InfoPath 2010 the same way they used to as long as the form template remains in the InfoPath 2007 Form Template format. However, if you wish to upgrade your form template to InfoPath 2010 to take advantage of newly added functionality for the control (see this blog post for more details) or other exciting new features, you will have to perform the steps outlined in this post in order to use the Person/Group Picker.
After the form template is saved in the new format, you will notice that each Person/Group Picker in your view will show the following error message when you hover your mouse cursor over it.
Also the Design Checker task pane appears, indicating that the version of the Person/Group Pickers in the view is not compatible with InfoPath 2010. For each Person/Group Picker in all views, do the following:
Preview the form in InfoPath Designer or publish the form to a SharePoint site (be sure to publish to a different location in order to be able to view previously filled out forms) and view the form, enter a name or logon alias, click the “Check Names” button and resolve the name! Alternatively you can click the “Address book” button to perform a search if you do not know the complete name of the user.
To configure advanced control properties that are new in InfoPath 2010, such as limiting the entities the control can pick, as well as requiring the control to contain data before the form can be submitted, follow the steps in this blog post.
If you added the control to your InfoPath 2007 form template following the steps outlined in this blog post, you will have created a data connection called Context, which specifies the SharePoint site the Person/Group Picker should connect to. Follow these steps to recover the data connection XML file and obtain the URL of SharePoint site:
It was brought to our attention that external e-mails that were sent to coolform@microsoft.com were not getting through. This issue has now been resolved.
This week’s cool form displays your local weather forecast by using a REST Web Service data connection to pull in weather information from an online weather service. There are two views to the form, one minimal and one extended. The form contains linked picture controls that use rules to concatenate the Web service data and generate a URL pointing to images on the weather site. By hosting this form inside the InfoPath form Web part, you can display the latest weather forecast information on your SharePoint portal pages.
Minimal View:
Extended View:
For more information about using REST Web Service data connections with InfoPath forms, see our earlier blog post http://blogs.msdn.com/infopath/archive/2010/02/11/add-a-dynamic-map-to-a-contact-form-using-rest-web-services.aspx.
If you want to learn more about InfoPath and SharePoint 2010 directly from the Microsoft product team, then sign up for the InfoPath 2010 Academy Live Series.
There are 2 remaining sessions in the series. The next session “Form-Driven Mashups using InfoPath and SharePoint 2010", presented by Nick Dallett, an InfoPath program manager lead, will take place on Wednesday, April 7th from 8:30 AM to 10:00 AM (PST).
If you missed our first 2 sessions, “An introduction to SharePoint applications using InfoPath 2010” and "Building SharePoint Applications with InfoPath 2010", you can view them on demand here. Just click the “Register Now” button.
This is a great opportunity to learn all about our new features and scenarios directly from the product team, so sign up now!