InfoPath Best bets and Tips and Tricks
Agenda•Brief InfoPath Overview•Some of the shortcomings of InfoPath•Demo: Getting InfoPath forms into a web part•Demo: Overcoming 5 conditional formatting declarations•Demo: Getting a Sum Total, of a repeating tables field•Questions
Eric HarlanFew Tidbits:
• http://www.ericharlan.com• @ericharlan• President/Co-founder of Baltimore SharePoint Users Group• Principal SharePoint Architect for Sogeti LLC• In I.T. for 10 years, SharePoint for 6• TechEd South Africa• SharePoint Saturday Baltimore #spsbmore @spsbaltimore
Notes• Laugh, Smile: I will and if I’m the only one, I just look insane.• Ask questions, this should be us talking, not me talking to you!
BALTIMORE SharePointUsers Group
http://www.BaltimoreSUG.org
• Knowledge Base (need help? Ask)
• Previous meeting Slide Decks
• Streaming Presentations
• How To’s and Links
• News
• Meeting Agendas
What is InfoPath?
What is InfoPath?
• Digital Form Creation Tool
• XML Based
• Data stored to SPFS, Web Services Email, etc
• Allows Code Behind
• Offers a tangible goal of Paperless office.
• Offers ability to perform business related functions.
Pros & Cons
InfoPath Pros and Cons
Pros
• Very quick to do simple forms
• InfoPath does what .Net custom forms do with point and clicking
• Mild to Power users can create forms in no time
• Easy to integrate with MOSS and store data
• Gives developers a huge launch pad in which to do custom forms
• In browser mode, the user only needs a browser and permissions.
Cons
• If planning is not done on large forms with respect to: schema and groups/sections time and efforts can be wasted
• Cryptic intricacies
• Functionality goes down if you use InfoPath Form Services Browser Mode
• If you do not use Browser mode, every user needs InfoPath installed
Sections
Sections (Optional, Repeating) Repeating Tables
• One of the most critical parts of InfoPath to learn
• Used in 99% of all forms
• Each have very distinctive personalities
(For example, to hide “insert item” you must nest Repeating table in a section)
• Filters, Rules, Conditional formatting apply to sections/repeating tables
Conditional Formatting
Conditional Formatting• Allows you to hide or show based on various
variables
• Have to think in opposites since only options
for hiding.
• Variable examples:
• “is/not equal to”
• “less than or equal to”
• “is/not blank”
• “does/doesn’t begin with”
• “does/not match pattern” (phone #, social #, zip/+4, custom)
• Allows: Bold, underline, strikethrough, italic, font color change and shading
Formulas
Formulas
• Allows you to populate fields based on other form data
• Allows concatenation of multiple fields (ex: unique form entry “User_Name + Now()”
• Various formulas built in from Sum to Substrings
Tips and Tricks
Tips and Tricks• InfoPath Branding is hard. Natively InfoPath forms only show in the client application. Or as a full page browser form……..Natively
•Conditional formatting, Rules etc, don’t allow more than 5 conditions. And since InfoPath only reads the first one use an Xpath Expression to populate the CF with more than 5. (see example)
•When using drop down control that is bound to only one text/string control element, getting a SUM of the total amount of times a value was selected in a repeating table is tricky. You must again use the Xpath method to produce a string the resembles:
count(/my:Schema/my:Subgroup1/my:RepeatingGroup/[my:contorl_name_txt = ‘12345'])
Demo1) InfoPath in a web part!
2) Breaking the 5 C.F. barrier3) Getting the Sum of repeating
Fields
Questions?
THANK YOU!
BALTIMORE SharePoint Saturday July 25th
www.sharepointsaturday.org/baltimore
BSPUG: www.baltimoresug.org
Twitter: @ericharlanURL: www.ericharlan.com