Integrating InfoPath Forms. Paul Baker



Similar documents
INFOPATH FORMS FOR OUTLOOK, SHAREPOINT, OR THE WEB

Hands-On Lab. Client Workflow. Lab version: Last updated: 2/23/2011

INFOPATH FORMS FOR OUTLOOK, SHAREPOINT, OR THE WEB

Nintex Workflow 2010 Help Last updated: Friday, 26 November 2010

Create a new investment form and publish it to a SharePoint 2013 forms library

SharePoint Integration Framework Developers Cookbook

Advanced Workflow Concepts Using SharePoint Designer 2010

2 Introduction to Nintex Workflow

Learn how to create web enabled (browser) forms in InfoPath 2013 and publish them in SharePoint InfoPath 2013 Web Enabled (Browser) forms

ACCESS Importing and Exporting Data Files. Information Technology. MS Access 2007 Users Guide. IT Training & Development (818)

Guide to Automating Workflows Quickly and Easily

STEVEN MANN. InfoPath* with. SharePoint HOW-TO. 800 East 96th Street, Indianapolis, Indiana USA

Microsoft SharePoint Products & Technologies

Enterprise Application Development in SharePoint 2010

Nintex Workflow 2013 Help

SharePoint 2013 Syllabus

Step-By-Step build Advanced InfoPath Form and SharePoint Designer Workflow

Microsoft Office System Tip Sheet

Known limitations The following table lists features and their known limitations in Internet Explorer 8 (64-bit) and Internet Explorer 9 (64-bit).

Add Approval Workflow

INTRODUCTION: SQL SERVER ACCESS / LOGIN ACCOUNT INFO:

Microsoft SharePoint Products & Technologies

Handout: Creating Forms in Word 2010

Getting Started with Telerik Data Access. Contents

SharePoint 2013 for Business Process Automation

Nintex Workflow 2013 & InfoPath Form Design workshop

SharePoint Training DVD Videos

Business 360 Online - Product concepts and features

SharePoint Checklist and Resources

SharePoint 2010 for Business Intelligence Course SP05; 3 Days, Instructor-led

Chapter 15: Forms. User Guide. 1 P a g e

Installation & User Guide

Outlook 2010 basics quick reference sheet

User's Guide. ControlPoint. Change Manager (Advanced Copy) SharePoint Migration. v. 4.0

Hands-On Lab. Building a Data-Driven Master/Detail Business Form using Visual Studio Lab version: Last updated: 12/10/2010.

Nintex Workflow 2010 Installation Guide. Installation Guide Nintex USA LLC, All rights reserved. Errors and omissions excepted.

The Recipe for Sarbanes-Oxley Compliance using Microsoft s SharePoint 2010 platform

Office 365 SharePoint Setup and Admin Guide

Master Data Services. SQL Server 2012 Books Online

Appendix A How to create a data-sharing lab

David Chou. Architect Microsoft

TECHNICAL DOCUMENTATION SPECOPS DEPLOY / APP 4.7 DOCUMENTATION

Table and field properties Tables and fields also have properties that you can set to control their characteristics or behavior.

Staying Organized with the Outlook Journal

Microsoft Office 365 Portal

MOC 20488B: Developing Microsoft SharePoint Server 2013 Core Solutions

Microsoft Office Programs and SharePoint Products and Technologies Integration Fair, Good, Better, Best

Microsoft' Excel & Access Integration

HarePoint Workflow Scheduler Manual

Integration Microsoft Dynamics CRM with SharePoint and Office 365 via OData

FORMS & WORKFLOW SHAREPOINT Practical Discussion

Record Tagging for Microsoft Dynamics CRM

Report Builder. Microsoft SQL Server is great for storing departmental or company data. It is. A Quick Guide to. In association with

Nintex Forms 2013 Help

Microsoft Office System Tip Sheet

Colligo Briefcase Enterprise. Administrator s Guide

SharePoint. Site Owner s Manual. Please send feedback or suggestions for updates to the following address IT.Training@lse.ac.

MS 50547B Microsoft SharePoint 2010 Collection and Site Administration

SharePoint Development Options: Requirements Gathering

Layer2 Business Data List Connector for SharePoint

SHAREPOINT 2010 FOUNDATION FOR END USERS

NINTEX WORKFLOW TIPS AND TRICKS. Eric Rhodes

UF Health SharePoint 2010 Document Libraries

How To Integrate SAP Business Data Into SharePoint 2010 Using Business Connectivity Services And LINQ to SAP

Office and SharePoint

Course Descriptions for Focused Learning Classes

Jet Data Manager 2012 User Guide

Microsoft. Outlook ADVANCED FEATURES AND FUNCTIONS

Localizing dynamic websites created from open source content management systems

Release 2.1 of SAS Add-In for Microsoft Office Bringing Microsoft PowerPoint into the Mix ABSTRACT INTRODUCTION Data Access

Excel Reports and Macros

mylittleadmin for MS SQL Server 2005 from a Webhosting Perspective Anthony Wilko President, Infuseweb LLC

Authoring for System Center 2012 Operations Manager

Building and Using Web Services With JDeveloper 11g

WebSpy Vantage Ultimate 2.2 Web Module Administrators Guide

Desktop Computing in Skillport Finding Approved Folders and Printing Certificates of Completion

Implementing and Administering an Enterprise SharePoint Environment

Microsoft Outlook And- Outlook Web App (OWA) Using Office 365

SharePoint Services: Using Workflows

Intellect Platform - Tables and Templates Basic Document Management System - A101

What is a workflow? Workflows are a series of actions that correspond to a work process

Virto Workflow Scheduler For Microsoft SharePoint Release User and Installation Guide

Set Up and Maintain Customer Support Tools

Project Server Plus Risk to Issue Escalator User Guide v1.1

SharePoint 2010/2013 Course

Colligo Manager 6.0. Offline Mode - User Guide

Frequently Asked Questions Sage Pastel Intelligence Reporting

How To Create A Site In Sharepoint 2013

T300 Acumatica Customization Platform

Sophos for Microsoft SharePoint Help

TheEducationEdge. Export Guide

Product Guide Nintex. All rights reserved. Errors and omissions excepted.

Richmond SupportDesk Web Reports Module For Richmond SupportDesk v6.72. User Guide

Transcription:

Integrating InfoPath Forms Paul Baker

About the Speaker. Paul Baker Director of Educational Innovation Perse School, Cambridge http://www.perse.co.uk pdbaker@perse.co.uk The Perse School regularly features in the top 25 schools nationally. Our commitment to producing happy and successful students leads to positive, focused work on how ICT can contribute to learning and strong community.

About the Speaker. Paul Baker p_d_baker mathstweets

I m interested in SharePoint Virtual Learning Tools SCORM Learning Banks Microsoft Reporting Services Parent Communication

A long way to go.forward together EASN : East Anglia SharePoint Network for schools http://www.easn.org.uk Sharing ideas and work in progress Sharing between independent and state schools

What is Microsoft InfoPath?

What Content is Microsoft Slide InfoPath? an application used to develop XML-based data entry forms. To use InfoPath to fill in a form, a user must have a designer develop an InfoPath template first. The most common usage of InfoPath is to integrate it with Microsoft SharePoint. In SharePoint, a "Form Library" can be created and developed by using InfoPath. InfoPath fields will be exported as "Columns" in the library.

Requirements Content Slide InfoPath 2007 Included in Office 2007 Ultimate and the volume license editions, Professional Plus, Enterprise, and sold separately InfoPath 2010 Included in Office 2010 Professional Plus WSS/SharePoint 2007/2010 to host form libraries SharePoint Enterprise for InfoPath form services functionality. (Or as the separate Office Forms Server 2007 product.)

Example

Designed using Controls Drag and Drop

Published to make available

InfoPath is XML-based Designing a form means defining an xml structure and a user interface to interact with that structure. Behind the scenes the structure is defined using a schema InfoPath calls that structure and the data that it contains when being completed the main data source

InfoPath is XML-based

InfoPath is XML-based If extracted

InfoPath is XML-based When a form is completed and saved then that data is saved as a single xml file, preferably into a sharepoint forms library that can read the contents of the file directly. That xml file contains a reference to the location of the xsn file so that if it is opened again it can display the data in the original view.

InfoPath is XML-based In a SharePoint forms library, content of xml documents can be collated and displayed in columns in real time.

InfoPath is XML-based Data is well defined Data can be accessed and transformed or summarised easily Validation can be applied Routing can be applied conditionally

Stepping on from Word

Stepping on from Word

Case Study 1 : Annual Fund Application

Case Study 1 : Annual Fund Application

Case Study 1 : Annual Fund Application

Case Study 1 : Annual Fund Application

Case Study 1 : Annual Fund Application

Case Study 1 : Annual Fund Application

Case Study 1 : Annual Fund Application

Case Study 1 : Annual Fund Application

Case Study 2 : Driver Declaration Forms

Case Study 2 : Driver Declaration Forms

Case Study 2 : Driver Declaration Forms

Case Study 2 : Driver Declaration Forms

Case Study 2 : Driver Declaration Forms

Case Study 2 : Driver Declaration Forms

Case Study 2 : Driver Declaration Forms

Case Study 2 : Driver Declaration Forms

Case Study 2 : Driver Declaration Forms

Case Study 3 : ParentPay Requests

Case Study 3 : ParentPay Requests

Case Study 3 : ParentPay Requests

Case Study 3 : ParentPay Requests

Case Study 3 : ParentPay Requests

Case Study 3 : ParentPay Requests

Case Study 3 : ParentPay Requests

Case Study 3 : ParentPay Requests

Designing an InfoPath form. Adding validation and configuring views. Publishing options and property promotion. Save vs Submit Completing a form PLACE DEMO TITLE HERE Email options. InfoPath Samples

InfoPath does Data Connections Data Connections can be for receiving or submitting data. Connections can be to SQL Server or Access databases, Web Services, SharePoint List or Library or another XML document. Defining a connection creates another Data Source in the InfoPath document.

Data Connection Templates InfoPath provides form templates to quickly configure forms whose data structure is determined by an external data source......from a database, a web service or an xml document. These templates lock your main data source schema to be consistent with the data source you are connection to. Limited functionality for writing back to the data source unless SQL Server or using code.

Using a Data Connection Template PLACE DEMO TITL HERE Binding a drop down list row items Using The Submit Button Create Merged InfoPath Docs without Data Conn

VBA - Access Public Sub exportxml() Dim strstaffcode As String, filename As String, strpath As String strpath = "C:\Users\pdbaker\Documents\SharePoint\LearningGateway2010\DemoDatabase2\" strstaffcode = "MCS" filename = strstaffcode & ".xml" Application.exportXML _ ObjectType:=acExportQuery, _ DataSource:="UCASComment", _ DataTarget:=strPath & "raw-" & filename, _ WhereCondition:="StaffCode='" & strstaffcode & "'" Transform _ sourcefile:=strpath & "raw-" & filename, _ stylesheetfile:=strpath & "InfoPath.xsl", _ resultfile:=strpath & filename End Sub Private Sub Transform(sourceFile, stylesheetfile, resultfile) ' courtesy of http://www.oreillynet.com/xml/blog/2005/04/transforming_xml_in_microsoft.html

Transform Stylesheets Download an identity transformation and then modify the root template to include the InfoPath processing instructions. <xsl:template match="/"> <xsl:processing-instruction name="mso-infopathsolution"> <xsl:text> solutionversion="1.0.0.4" productversion="12.0.0" PIVersion="1.0.0.0 href="file:///c:\ucascomments.xsn" name="urn:schemas-microsoft-com:office:infopath:ucascomments:-myxsd-2010-07- 09T19-58-45" </xsl:text> </xsl:processing-instruction> <xsl:processing-instruction name="mso-application"> <xsl:text> progid="infopath.document" versionprogid="infopath.document.2" </xsl:text> </xsl:processing-instruction> <xsl:apply-templates select="node()"/> </xsl:template>

LINQ in C# - Visual Studio XDocument xml = XDocument.Load(txtFile.Text); XNamespace ns = "http://schemas.microsoft.com/office/infopath/2003/myxsd/2010-07-10t19:35:48"; var query = (from p in xml.elements(ns + "UCASComments").Elements(ns + "UCASComment") select p.element(ns + "StaffCode").Value).Distinct(); foreach (var record in query) { XDocument xmloutput = XDocument.Load(txtFile.Text); var queryremove = (from p in xmloutput.elements(ns + "UCASComments").Elements(ns+"UCASComment") where p.element(ns+"staffcode").value!= record select p); } queryremove.remove(); xmloutput.save(txtoutput.text + @"\" + record + @".xml");

Submit options

Case Study 4 : Pupil Progress/Tracking

Bound to web services Our MIS (WCBS PASS) Code, form, email addresses of student and teacher which came from same web service is separated into fields.

[WebMethod] public XmlDocument getfilteredstudents(string StartsWith) { DBQuery dbq = new DBQuery(); QueryParamCollection qpcoll = new QueryParamCollection(); string param = StartsWith.Trim(); param += param.endswith(@"%")?"":@"%"; qpcoll.add(new QueryParam("@StartsWith",param)); XmlDocument result = dbq.executexmldocument("zzgetstudentsfilteredxml",dbq.connection,qpcoll); return result; }

[WebMethod] public XmlDocument getfilteredstudents(string StartsWith) { DBQuery dbq = new DBQuery(); QueryParamCollection qpcoll = new QueryParamCollection(); string param = StartsWith.Trim(); param += param.endswith(@"%")?"":@"%"; qpcoll.add(new QueryParam("@StartsWith",param)); XmlDocument result = dbq.executexmldocument("zzgetstudentsfilteredxml",dbq.connection,qpcoll); return result; }

CREATE PROCEDURE [dbo].[zzgetstudentsfilteredxml] @StartsWith VARCHAR(21) AS ( SELECT 1 as Tag, NULL as Parent, '1' as [outertag!1!id], null as [pupil!2!id], null as [pupil!2!name!element], null as [pupil!2!code!element], null as [pupil!2!form!element], UNION SELECT 2 as Tag, 1 as Parent, '1' as [outertag!1!id], PUPIL_ID AS [pupil!2!id], SURNAME + ',' + PREFERRED_NAME + ' (' + [FORM] + ')' AS [pupil!2!name!element], CODE AS [pupil!2!code!element], ISNULL([FORM], "NA") AS [pupil!2!form!element] ) FROM Curr_Pupils_Curr_Year WHERE SUB_SCHOOL='UPPER' AND SURNAME LIKE @StartsWith ORDER BY [pupil!2!name!element] FOR XML EXPLICIT

Submit button which submits first to PASS and then also to a sharepoint document library. Our MIS (WCBS PASS) SP creates email notifications and allows a secretary to retrieve and file any documentation onto the pupil record.

[SUBMIT] WORKFLOW (SHAREPOINT DESIGNER) EMAILS

Lookup from another SharePoint List which stores extra staff that want to be notified on the form group level. (e.g. Head of year)

Case Study 5 : Perse Quiz Project

Case Study 5 : Perse Quiz Project

Case Study 5 : Perse Quiz Project

Case Study 5 : Perse Quiz Project

Case Study 5 : Perse Quiz Project

Case Study 5 : Perse Quiz Project Images are extracted from the xml when it is submitted to the web service and replaced with the filename of the image. The XML is then just saved, ready to be displayed as a quiz using a stylesheet transform when the quiz is requested.

InfoPath does code You can attach code to buttons, form events and control events Can be written in C#,VB, Jscript or VBScript The interface is VSTA : Visual Studio tools for applications. You can control the user interface and also control and requery the data connections using the object model.

InfoPath does code Example: Copy nodes directly from a data connection to your own main data source.

InfoPath does code public void btnload_clicked(object sender, ClickedEventArgs e) { // Create an XPathNavigator object to navigate the main data source XPathNavigator xpnmain = MainDataSource.CreateNavigator(); string strfilter = xpnmain.selectsinglenode("/my:ucascomments/my:txtfilter", NamespaceManager).Value; // Retrieve the connection object from the data connection AdoQueryConnection myconn = (AdoQueryConnection)(DataSources["qryUCAS"].QueryConnection); myconn.command = @"select [StaffCode],[Department],[Pupil Name] as [PupilName],[Yeargroup] from [qryucas] as [qryucas] where [StaffCode] like '" + strfilter + "%'"; myconn.execute(); // Delete current ucas comments from the main data source XPathNavigator xpnold; do { xpnold = xpnmain.selectsinglenode("/my:ucascomments/my:ucascomment", NamespaceManager); if(xpnold!=null) xpnold.deleteself(); } while (xpnold!=null);...continued next slide

InfoPath does code // Create an XPathNavigator object to navigate the data connection XPathNavigator xpndconn = DataSources["qryUCAS"].CreateNavigator(); XPathNodeIterator xpnnewnodes = xpndconn.select("/dfs:myfields/dfs:datafields/d:qryucas", NamespaceManager); XPathNavigator xpnucascomments = xpnmain.selectsinglenode("/my:ucascomments", NamespaceManager); string nspace = xpnucascomments.namespaceuri; foreach(xpathnavigator xpnnew in xpnnewnodes) { XmlWriter writer = xpnucascomments.prependchild(); writer.writestartelement("my", "UCASComment", nspace); writer.writeelementstring("my", "StaffCode",nspace, xpnnew.selectsinglenode("@staffcode").value); writer.writeelementstring("my", "Department", nspace, xpnnew.selectsinglenode("@department").value); writer.writeelementstring("my", "PupilName", nspace, xpnnew.selectsinglenode("@pupilname").value); writer.writeelementstring("my", "Yeargroup", nspace, xpnnew.selectsinglenode("@yeargroup").value); writer.writeelementstring("my", "Comment", nspace, ""); writer.writeendelement(); writer.close(); } }

Tool Tie-ins Parent Communication : www.schoolpost.co.uk

Tool Tie-ins Parent Communication : www.schoolpost.co.uk

Tool Tie-ins Parent Communication : www.schoolpost.co.uk

Tool Tie-ins Parent Communication : www.schoolpost.co.uk

Tool Tie-ins Parent Communication : www.schoolpost.co.uk?

Tool Tie-ins Workflow Tools Visual Studio SharePoint Designer Visio Nintex

Tool Tie-ins Microsoft Reporting Services

Tool Tie-ins Microsoft Reporting Services

Tips and Tricks

Digital signatures Can enable digital signatures on sections of the form And when applied can make the form read only But requires a certification authority or Windows Server acting in this role or self-certified (but the latter is not secure and requires access to the certificates snap-in of mmc to update/delete.)

Digital signatures Perhaps Workflows and Contact Selector controls are better When submitted then if it is missing an HOD signature then the workflow generates an email to the HOD with the link to the submitted form. When both boxes are ticked then the workflow generates an acknowledgement email to both parties and rules can make the form read only. In the SharePoint Library, the Last Modified By will be the HOD.

InfoPath Form Services Hosts the InfoPath form in the browser......so clients don t need the application installed. Limits the functionality that you can use. Needs to be more standard and doesn t support certain controls (e.g. attachment or image control or bulleted list) and restrictions on code, rules, filters etc. http://office.microsoft.com/en-us/infopath-help/infopath-2007-features- that-are-unavailable-in-infopath-forms-services- HA010210587.aspx?CTT=3#BM4 Requires SharePoint Enterprise With more detailed forms it is probably still better to be designing on a client application that can be saved at regular intervals to your hard drive and doesn t rely Free, widely distributed client app would be perfect Are Microsoft heading in that direction?

Contact Selector http://www.sharepointassist.com/2009/02/27/adding-a-contactselectorpeople-picker-to-an-infopath-form/

Quick-Start Design

Form Options

Template Parts E.g. Use with the contact selector to create a pre-configured contact selector

Outlook InfoPath Form Folders

Workflow integration

InfoPath 2010 http://blogs.msdn.com/b/infopath/archive/2009/07/15/what-s-new-in-infopath-2010.aspx

InfoPath 2010 Conforms with the Ribbon interface More pre-built and attractive layouts

InfoPath 2010 New and Improved Controls New controls in InfoPath 2010 include: Picture buttons Instead of the default gray button, use any image as a button in your form. Hyperlink capabilities Allow users to insert their own hyperlinks when filling out forms. Date and time picker Allow users to insert dates and times in their forms Person/Group pickers Updated! This is now a first class control and is included by default in the Controls gallery. Signature Line (Editor Only) Allow users to digitally sign a form Controls and functionality that are now supported in browser forms include: Bulleted, numbered, and plain lists, multiple selection list boxes, Combo boxes, Choice group and sections, and Filtering functionality.

InfoPath 2010 New and Improved Add Rules to your Forms With our new out-of-the-box rules (or quick rules) and improved rules management UI, you can easily add rules to validate data, format your form, or perform other actions with just a couple of clicks, and without any code.

InfoPath 2010 Publish Forms Quickly Our new quick publish functionality allows you to publish forms in a single click (no more clicking through the Publishing Wizard every time you want to make an update to your forms!) Create Mashups using the InfoPath Form Web Part Now, without writing a single line of code, you can host your InfoPath browser forms in Web pages by simply adding the InfoPath Form Web Part to a Web Part page. You can also connect it to other Web Parts on the page to send or receive data.

InfoPath 2010 Create Forms for SharePoint Lists Using InfoPath, you can now extend and enhance the forms used for creating, editing and viewing items in a SharePoint list. In a browser, simply navigate to a SharePoint list, and on the SharePoint Ribbon under List Tools, choose the Customize Form option. This will automatically generate a form which looks very similar to the default out-of-the-box SharePoint list form. You can then customize and enhance this form by modifying the layout, creating additional views or pages, and adding rules to validate your data, show or hide sections of the form or set a fields value (to name just a few of the options).

InfoPath 2010 Create SharePoint Applications With InfoPath 2010, SharePoint Server 2010, and SharePoint Designer 2010, you can easily create powerful team, departmental or enterprise applications on top of SharePoint Server. Form-based applications: InfoPath forms can be integrated with components such as workflow, reporting, and custom Web pages to create rich form-based applications. Document Workflows: InfoPath can be used to design custom workflow initiation and task forms that drive document management processes. Business Connectivity Services: Integrating with BCS, it is straightforward to design InfoPath forms that create, read, update, and delete business data from a back-end system.

InfoPath 2010 InfoPath Editor The InfoPath 2010 Editor Fluent user interface provides a much improved, simpler user experience for filling out forms. Form opened in InfoPath 2010 Editor:

Lessons learnt Allow/encourage users to save straight away Allow save with validation errors use the complete technique instead. Remind users that they can save into my documents if they have connectivity problems Infopath documents are much more stable than web forms (which expire/lose connections) but do require InfoPath to be installed on the client.

Lessons learnt InfoPath form services don t support all the functionality of InfoPath. Be careful when changing the design of a live form to maintain data compatibility with completed forms where necessary. You can set up alerts on sharepoint (or workflows through sharepoint designer) that react to what has been entered in the form Make sure you keep the xsn file where it was published (i.e. don t delete the forms library or the folder in the case of a network share). Otherwise completed forms can t be easily opened.

Q & A

Thank you for attending! pdbaker@perse.co.uk http://www.perse.co.uk