Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.
Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.


InfoPath – sample XSN form templates (2007, 2010, 2013)

Below are example form templates from InfoPath 2007 upgraded to the newer 2010 and 2013 versions.  With InfoPath Designer/Filler on the desktop as separate applications these templates were removed.   Hopefully these are helpful to those working on InfoPath 2010 and 2013 for quick start.




NOTE – There has been a lot of talk recently about InfoPath going away.   While that may happen over time, there are still thousands of live forms in production today SharePoint admins must support.   As long as Microsoft includes InfoPath in the Office suite I believe there will be many scenarios where InfoPath makes sense.   Complete an expense report and submit for approval?   Done.  One hour with InfoPath Designer and SharePoint Designer.  No code.  Anyone can support.  Just my two cents.

InfoPath – Repeating Table Select One Primary Row

Need to ask users to select one row in a repeating table?   Then you’ll want to see the screenshots below.  There are four simple components:

  1. Repeating table has “rowNum” with default value formula to dynamically calculate a row number.   “count(../preceding-sibling::*) + 1” can be entered with XPath mode.
  2. Main non-repeating “selectedRow” field outside of the table.  Will store the user selection.
  3. Make Primary” button in the repeating table.  Action rules here update the “selectedRow” number.
  4. icon” section to show the actively selected row.  Formatting rules here show it only when selected.


Now when a user clicks the “Make Primary” the main non-repeating “selectedRow” value will be updated to have the number of the actively selected row.  Formatting rules will hide the button and display a green check mark instead.  This provides user feedback and makes for a more intuitive experience.

Also, this solution could be extended with checkbox icons for a more seamless feel.  Simply change the regular “Make Primary” button to a picture button with an image with an unchecked box.   Then update the section to have an image of a fully checked box.   There are many options to format the active/de-active row display.


   CLICK HERE to download the XSN file



InfoPath Current User (AND Manager) Profile. Lumbergh Remix!

Recently I needed to get the current user and their manager’s Active Directory profile to auto-populate a form.   Itay Shakury wrote a great blog post titled Get the current user without writing code that covers the first need (current user) by reading UserProfileService.asmx. But I needed more.


Download sample form – ADManagerDetails.xsn

The strategy was to use 2 data connections and query the 2nd with the manager user ID from the first.   At that point you can map any document text field to be ready only and get the default value from one of these data connections.


Action Steps

  1. New InfoPath form in design mode
  2. Add 2 receive data connections to http://sharepoint2007/_vti_bin/UserProfileService.asmx
  3. Name them “UserProfile” and “ManagerProfile
  4. Leave the input parameters empty.  It will default to the current user.
  5. Open form Rules and add steps to “re-query” the ManagerProfile:
    1. Set field’s value:  query subtree of ManagerProfile to “Manager” value from UserProfile data tree
    2. Query data connection ManagerProfile.  With the filter set, it will now return different data.
  6. Enjoy and tell your friends.

Video Walkthrough (05:57)

How to build the sample form (above download) in full step-by-step video.  Only 6 minutes!  Well worth the time. 


InfoPath Current User (AND Manager) Profile. Lumbergh Remix! from Jeff Jones on Vimeo.

Hide the “Powered By InfoPath” logo

In working with InfoPath Forms Services in MOSS 2007 I found that the web based form experience is great.  And I like InfoPath but even I don’t want a logo bumper sticker to stare at all day.

By editing “ifsmain.css” on the SharePoint web front end’s 12 hive you can override the system styling to hide this element.   The IE developer toolbar helped me find the CSS class (ToolbarBranding) to add the “display:none” attribute.  Screen shot below. 



C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATELAYOUTSINCifsmain.css





© Copyright 2016
@ SPJeff

Return to Top ▲Return to Top ▲