Date post: | 28-Dec-2015 |
Category: |
Documents |
Upload: | maud-ferguson |
View: | 214 times |
Download: | 0 times |
Tips & Tricks for Developing Tips & Tricks for Developing InfoPath SolutionsInfoPath SolutionsTips & Tricks for Developing Tips & Tricks for Developing InfoPath SolutionsInfoPath Solutions
David CoeDavid CoeApplication Development ConsultantApplication Development ConsultantMicrosoft CorporationMicrosoft Corporation
AgendaAgenda
Choosing InfoPath (or not)Choosing InfoPath (or not)
Programming Models in InfoPathProgramming Models in InfoPath
Developing a basic formDeveloping a basic form
Publishing FormsPublishing FormsDirectlyDirectly
Using Forms ServicesUsing Forms Services
Advanced FormsAdvanced Forms
The data’s there, now what? The data’s there, now what? Programming against InfoPath forms (‘cause Programming against InfoPath forms (‘cause it’s just XML)it’s just XML)
AudienceAudience
People Interested in InfoPathPeople Interested in InfoPath
DevelopersDevelopers
Administrators may find this a bit boring Administrators may find this a bit boring (or scary)(or scary)
But there’s some for you tooBut there’s some for you too
Assume some experience with InfoPath, Assume some experience with InfoPath, SharePoint, and Form LibrariesSharePoint, and Form Libraries
Not a “how to” talkNot a “how to” talk
What it’s Good forWhat it’s Good for
Simple or Complex User InputSimple or Complex User InputNice for tracking threads, repeatable itemsNice for tracking threads, repeatable items
Reviews, travel requests, task/time trackingReviews, travel requests, task/time tracking
Attaching documents to sheetAttaching documents to sheet
InfoPath is XML, so a lot can be InfoPath is XML, so a lot can be automatedautomated
No programming No programming needed for many formsneeded for many forms
What it’s What it’s notnot Good at Good at
Difficult to save data beyond form Difficult to save data beyond form (services are best option)(services are best option)
Capturing history outside of specific Capturing history outside of specific document (ie, 12 months of reviews)document (ie, 12 months of reviews)
Connection management can be admin Connection management can be admin burden for Forms Servicesburden for Forms Services
Sample ApplicationsSample Applications
What do sample applications look like?What do sample applications look like?
Sample ApplicationsSample Applications
Programming ModelsProgramming Models
COM & Scripting Object ModelCOM & Scripting Object ModelJScript/VBScript (XDocument)JScript/VBScript (XDocument)
InfoPath 2003-compatable Managed Code InfoPath 2003-compatable Managed Code Object ModelObject Model
Not available for browser-based formsNot available for browser-based forms
InfoPath 2007 Managed Code Object InfoPath 2007 Managed Code Object ModelModel
Subset available for browser-enabled formsSubset available for browser-enabled forms
InfoPath Managed Code External InfoPath Managed Code External Automation Object ModelAutomation Object Model
Developing a Basic FormDeveloping a Basic Form
Straight forward, no code, no repeatingStraight forward, no code, no repeating
Easy to pick upEasy to pick up
Developing a Basic FormDeveloping a Basic Form
Start from scratchStart from scratch
Customize a sampleCustomize a sample
Start from XML or web serviceStart from XML or web service
Basic Form Basic Form
Publishing a FormPublishing a Form
Save your templateSave your template
Publish to SharePoint, e-mail, network Publish to SharePoint, e-mail, network shareshare
Publishing the FormPublishing the Form
Publishing to Forms ServicesPublishing to Forms Services
Simply configure to display as web pageSimply configure to display as web page
Require administrative approval if:Require administrative approval if:Form contains managed codeForm contains managed code
Full Trust requiredFull Trust required
Data connection needs to be managedData connection needs to be managed
Form is enabled for mobile displayForm is enabled for mobile display
Simple Publishing in Forms ServicesSimple Publishing in Forms Services
Advanced Form DevelopmentAdvanced Form Development
An advanced form contains repeatable An advanced form contains repeatable regions, complex relationships, code regions, complex relationships, code behind, etc.behind, etc.
Starting from XML/XSD documentStarting from XML/XSD document
Advanced Form & Forms ServicesAdvanced Form & Forms Services
What do I do with the Data?What do I do with the Data?
So you’ve captured all your user input … So you’ve captured all your user input … What do you do with it now?What do you do with it now?
Whether the documents are in the file Whether the documents are in the file system or in SharePoint, you can parse system or in SharePoint, you can parse them however you likethem however you like
Two SamplesTwo Samples
Parsing data from the File SystemParsing data from the File System
Parsing data from SharePointParsing data from SharePoint
File System SampleFile System Sample
All InfoPath documents reside on the file All InfoPath documents reside on the file systemsystem
XSD generator to generate XSD from XSD generator to generate XSD from InfoPath doc for use with XmlSerializerInfoPath doc for use with XmlSerializer
VSTO in Excel VSTO in Excel
Excel loads and parses documentsExcel loads and parses documents
Generate pivot tables and chartsGenerate pivot tables and charts
Excel Parsing InfoPathExcel Parsing InfoPath
SharePoint SampleSharePoint Sample
InfoPath documents reside in Form InfoPath documents reside in Form LibraryLibrary
Need to be able to parse the XML from Need to be able to parse the XML from the documents in the SharePoint librarythe documents in the SharePoint library
SharePoint SampleSharePoint Sample
Need:Need:1000s of opportunities across the district 1000s of opportunities across the district identified in SDPsidentified in SDPs
How can we plan for all of these and try to How can we plan for all of these and try to have local resources handle the requests?have local resources handle the requests?
Provide a steady burn over 12 month period Provide a steady burn over 12 month period to level out marginto level out margin
How I Did ItHow I Did It
Small WinForms appSmall WinForms app
SharePoint List Service / SharePoint List Service / CAML to get URL of InfoPath CAML to get URL of InfoPath docsdocs
Use Use WebClientWebClient DownloadString(url) method DownloadString(url) method to get the XML from InfoPathto get the XML from InfoPath
Use XPath to parse the Use XPath to parse the documentdocument
Dump data into Excel Dump data into Excel documentdocument
What Else is InterestingWhat Else is Interesting
It is possible to downgrade a form from It is possible to downgrade a form from MOSS/InfoPath 2007 to WSS/2003MOSS/InfoPath 2007 to WSS/2003
Outside vendor developed form and site for Outside vendor developed form and site for my customer in MOSS/InfoPath 2007. my customer in MOSS/InfoPath 2007.
My customer only had WSS and InfoPath My customer only had WSS and InfoPath 2003 so we needed to downgrade.2003 so we needed to downgrade.
Wasn’t that bad.Wasn’t that bad.
Additional ResourcesAdditional Resources
InfoPath Team BlogInfoPath Team Blog
InfoPath Developer PortalInfoPath Developer Portal
InfoPath 2007 Document: Developing InfoPath 2007 Document: Developing InfoPath 2007 Managed-Code SolutionsInfoPath 2007 Managed-Code Solutions
Guide to InfoPath 2007 Developer Guide to InfoPath 2007 Developer DocumentationDocumentation
Microsoft Office InfoPath PortalMicrosoft Office InfoPath Portal
InfoPath 2007 Sample: Training Labs InfoPath 2007 Sample: Training Labs
© 2009 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.