+ All Categories
Home > Documents > Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant...

Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant...

Date post: 28-Dec-2015
Category:
Upload: maud-ferguson
View: 214 times
Download: 0 times
Share this document with a friend
Popular Tags:
27
Tips & Tricks for Tips & Tricks for Developing InfoPath Developing InfoPath Solutions Solutions David Coe David Coe Application Development Application Development Consultant Consultant Microsoft Corporation Microsoft Corporation
Transcript
Page 1: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

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

Page 2: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft 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)

Page 3: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

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

Page 4: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

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

Page 5: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

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

Page 6: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

Sample ApplicationsSample Applications

What do sample applications look like?What do sample applications look like?

Page 7: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

Sample ApplicationsSample Applications

Page 8: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

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

Page 9: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

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

Page 10: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

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

Page 11: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

Basic Form Basic Form

Page 12: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

Publishing a FormPublishing a Form

Save your templateSave your template

Publish to SharePoint, e-mail, network Publish to SharePoint, e-mail, network shareshare

Page 13: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

Publishing the FormPublishing the Form

Page 14: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

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

Page 15: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

Simple Publishing in Forms ServicesSimple Publishing in Forms Services

Page 16: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

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

Page 17: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

Advanced Form & Forms ServicesAdvanced Form & Forms Services

Page 18: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

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

Page 19: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

Two SamplesTwo Samples

Parsing data from the File SystemParsing data from the File System

Parsing data from SharePointParsing data from SharePoint

Page 20: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

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

Page 21: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

Excel Parsing InfoPathExcel Parsing InfoPath

Page 22: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

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

Page 23: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

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

Page 24: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

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

Page 25: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

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.

Page 26: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

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

Page 27: Tips & Tricks for Developing InfoPath Solutions David Coe Application Development Consultant Microsoft Corporation.

© 2009 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.


Recommended