Download presentation
Presentation is loading. Please wait.
Published byMaud Ferguson Modified over 9 years ago
1
Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation
2
Agenda Choosing InfoPath (or not) Programming Models in InfoPath Developing a basic form Publishing Forms Directly Using Forms Services Advanced Forms The data’s there, now what? Programming against InfoPath forms (‘cause it’s just XML)
3
Audience People Interested in InfoPath Developers Administrators may find this a bit boring (or scary) But there’s some for you too Assume some experience with InfoPath, SharePoint, and Form Libraries Not a “how to” talk
4
What it’s Good for Simple or Complex User Input Nice for tracking threads, repeatable items Reviews, travel requests, task/time tracking Attaching documents to sheet InfoPath is XML, so a lot can be automated No programming needed for many forms
5
What it’s not Good at Difficult to save data beyond form (services are best option) Capturing history outside of specific document (ie, 12 months of reviews) Connection management can be admin burden for Forms Services
6
Sample Applications What do sample applications look like?
7
Sample Applications
8
Programming Models COM & Scripting Object Model JScript/VBScript (XDocument) InfoPath 2003-compatable Managed Code Object Model Not available for browser-based forms InfoPath 2007 Managed Code Object Model Subset available for browser-enabled forms InfoPath Managed Code External Automation Object Model
9
Developing a Basic Form Straight forward, no code, no repeating Easy to pick up
10
Developing a Basic Form Start from scratch Customize a sample Start from XML or web service
11
Basic Form
12
Publishing a Form Save your template Publish to SharePoint, e-mail, network share
13
Publishing the Form
14
Publishing to Forms Services Simply configure to display as web page Require administrative approval if: Form contains managed code Full Trust required Data connection needs to be managed Form is enabled for mobile display
15
Simple Publishing in Forms Services
16
Advanced Form Development An advanced form contains repeatable regions, complex relationships, code behind, etc. Starting from XML/XSD document
17
Advanced Form & Forms Services
18
What do I do with the Data? So you’ve captured all your user input … What do you do with it now? Whether the documents are in the file system or in SharePoint, you can parse them however you like
19
Two Samples Parsing data from the File System Parsing data from SharePoint
20
File System Sample All InfoPath documents reside on the file system XSD generator to generate XSD from InfoPath doc for use with XmlSerializer VSTO in Excel Excel loads and parses documents Generate pivot tables and charts
21
Excel Parsing InfoPath
22
SharePoint Sample InfoPath documents reside in Form Library Need to be able to parse the XML from the documents in the SharePoint library
23
SharePoint Sample Need: 1000s of opportunities across the district identified in SDPs How can we plan for all of these and try to have local resources handle the requests? Provide a steady burn over 12 month period to level out margin
24
How I Did It Small WinForms app SharePoint List Service / CAML to get URL of InfoPath docs Use WebClient DownloadString(url) method to get the XML from InfoPath Use XPath to parse the document Dump data into Excel document
25
What Else is Interesting It is possible to downgrade a form from MOSS/InfoPath 2007 to WSS/2003 Outside vendor developed form and site for my customer in MOSS/InfoPath 2007. My customer only had WSS and InfoPath 2003 so we needed to downgrade. Wasn’t that bad.
26
Additional Resources InfoPath Team Blog InfoPath Team Blog InfoPath Developer Portal InfoPath Developer Portal InfoPath 2007 Document: Developing InfoPath 2007 Managed-Code Solutions InfoPath 2007 Document: Developing InfoPath 2007 Managed-Code Solutions Guide to InfoPath 2007 Developer Documentation Guide to InfoPath 2007 Developer Documentation Microsoft Office InfoPath Portal Microsoft Office InfoPath Portal InfoPath 2007 Sample: Training Labs InfoPath 2007 Sample: Training Labs
27
© 2009 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.