How To Display the InfoPath Form Version on the Form

Published Wednesday, April 29, 2009 3:32 PM

Very handy for testing and help desk calls:

Tip: insert form version with the expression:
substring-before( substring-after( /processing-instruction()[local-name(.) = "mso-infoPathSolution"], 'solutionVersion="'), '"')

Source:  http://www.nivot.org/2008/09/30/WhyVSTO30VisualStudio2008SharePointWindowsWorkflowAndInfoPathMightGiveYouAHernia.aspx

Filed under:

Comments

# Bryan said on Tuesday, November 10, 2009 4:05 PM

Fantastic. Thanks!

# Anneliese said on Thursday, May 12, 2011 1:12 PM

Thank you, that's so helpful (even two years later)!

For folks new to InfoPath it might also be helpful to know that first:

1.  In InfoPath Designer, insert a Expression Box control on the form where you want the number to display.

2.  Insert the code above into the XPath field in the Expression Box popup window.

3.  Preview the form to see the version number.

Leave a Comment

(required) 
(required) 
(optional)
(required)