Publishing Applications in the Cloud with InfoPath Forms and Office 365
Ian Woodgate is Managing Director of PointBeyond Limited , the UK’s leading SharePoint Business Application specialists. Ian has a background in financial services and and IT. He has worked with SharePoint since its first release as a developer and subsequently as a solution architect. Ian regularly speaks at events around the country, focusing on the subject of delivering business applications using SharePoint, and recently wrote PointBeyond’s white paper ‘ Delivering Maximum Business Value With A SharePoint Based Application Strategy’ . He also runs the SharePoint UK user group meetings in Southampton. You can contact Ian at email@example.com or follow him on twitter @IanWoodgate .
This is the first of a series of articles in which we discuss how you can use InfoPath 2010 to quickly create and deploy business applications in the cloud with SharePoint Online, part of the Microsoft Office 365 platform. We’ll show how to publish a simple InfoPath form to SharePoint Online, and future articles will build upon this example.
For those not familiar, InfoPath is a Microsoft application that allows users to easily create and publish forms for collecting structured information. The InfoPath application ships with Microsoft Office Professional 2010, and is also available for separate purchase.
InfoPath solutions can be created by both developers and IT professionals, as well as tech-savvy business users such as analysts and information workers. Users can take advantage of the powerful combination of InfoPath and SharePoint 2010 to quickly create complete browser based applications without the need for custom code.
InfoPath ships with templates for common business forms such as Absence Request, Change Order, and Status Report. You can extend the sample forms or create new forms from a blank canvas.
InfoPath allows you to add business rules to validate data being entered (e.g. data must be a number) or to allow data entry on certain conditions (e.g. only an approver can view the approvals section). Rules are added using menus and configuration, so no coding is required, though InfoPath does support custom coding to enable more advanced customisations. Information that is collected when forms are filled out is saved as XML.
You can add your own custom branding and formatting so that your forms reflect your overall corporate style. And you can interact with data located on premise or in the cloud by creating connections to SQL Server, Access, web services, or SharePoint lists.
When forms are published to SharePoint, InfoPath Forms Services, a component of SharePoint 2010, renders them as HTML web forms, so end users do not require any extra software in order to access forms and submit data. Browsers supported by InfoPath Forms Services includes Internet Explorer 7 and upwards, as well as other modern browsers such as Google Chrome and Apple Safari.
It’s no secret that with InfoPath and SharePoint, you can quickly create and deploy business applications without the need for custom code and long, costly development cycles. Perhaps less known is that you can get the same benefits with Office 365 and SharePoint Online. You do need Office 365 plan E3 or E4, or SharePoint Online (Plan 2) if you want your forms to be browser enabled though, since only these plans include InfoPath Forms Services.
InfoPath forms provide more than enough power for creating data-focused applications such as absence reporting, expense approvals, and IT help desk requests. You wouldn’t want to use InfoPath and SharePoint to replace your current ERP system, but the combination is more than acceptable for a wide range of basic applications that are on most organisations’ development backlogs.
Let’s have a quick look at how to create, publish, fill, and submit a simple InfoPath form. In this demo, we’ll use a basic purchase order request form with a simple approval process. For the purposes of this article we have kept the form self-contained and it is therefore very simple. There are many ways in which it could be extended, some of which will be mentioned later.
The form used in this demo can be downloaded from here, along with instructions on the changes that are needed for deployment to your environment or SharePoint online site.
Using the InfoPath Office client we have placed controls on the form to enable the capture of the following information:
- Requestor’s name – this is a calculated field that picks up the current users Office 365 login name
- Date – defaults to today’s date
- Details – text box enabling entry of notes on the purchase order
- Repeating Table allowing multiple line items to be entered with :
- Item description
- Totals – automatically calculated
- An approval section only displayed at the relevant stage in the approval process, containing:
- Approval/Rejection decision
- Save – a button that saves the form so that it can continue to be worked on at a later date
- Submit for Approval – button that saves the form and starts a simple approval process
The form allows the application of sophisticated rule-based validation and formatting options. These can all be seen on the downloadable form. For example, the Request Approval section is configured to only be displayed when the form has been submitted for approval and is only shown to the specified approver.
The form is shown open in InfoPath below. The data structure and the rules applied to the ‘Submit for Approval’ button can be seen:
Before attempting to publish the form go to site settings in SharePoint and ensure you have the ‘SharePoint Server Enterprise Site Collection features’ feature activated under Site collection features. Also be sure to make the changes in the instructions that accompany the download.
Once the form is ready you can publish directly from InfoPath to your Office 365 SharePoint site. This will create a new form library in your chosen site. From the File menu in InfoPath, select the Publish tab. Click on ‘Publish form to a SharePoint Library’:
In the publishing wizard, enter the URL to your Office 365 SharePoint site and click ‘Next’:
Enter your Office365 credentials:
In the next screen ensure the ‘Enable this form to be filled out by using a browser’ checkbox is selected and select the Form Library radio button, then click ‘Next’:
In the next screen, choose to ‘Create a new form library’ to host your form or update the form if you have an existing Form Library:
Enter a suitable name and description and click ‘Next’:
Click ‘Next’ on the following screen leaving values as default:
Click ‘Publish’ on the summary screen:
The form is now available at the SharePoint Online address specified. InfoPath Forms Services will render the form as HTML, so that users can fill it in from their browser. When viewing the Form Library, clicking on the ‘Add document’ link will open the form in the browser. A user can now fill this in and submit it:
Once submitted the approver can open and review the form in a read-only view and approve/reject as appropriate:
If a form has been submitted and a non-approver attempts to open the form, the rules result in the following view being displayed:
This example demonstrates the power that InfoPath and SharePoint Online provide to quickly create form-based business applications in the cloud. This example, while quite basic, could easily be extended to accommodate more real-world scenarios. For example, you could:
- Add more fields, business rules, and validation with InfoPath
- Create more complex workflow logic, for example selecting different approvers depending on the purchase order value
- Store approver names in a SharePoint list rather than within the actual form
- Send email alerts to users when forms are submitted and approved
- Create list views so users can see their purchase orders, or purchase orders awaiting their approval
- Work with data stored in SharePoint Online lists
- Access remote business logic and data by calling web services or connecting to SQL Server or SQL Server Azure
We hope that this simple example demonstrates how you to quickly build and publish powerful business applications on the SharePoint Online platform using InfoPath and without needing custom code.
In a future article, we will present more advanced features such as additional workflow capabilities and integration with web services and SQL Azure data.