Show form version in Infopath with XPath


‘What form version do you use?’
‘Is this the most recently updated InfoPath form?’

Usually you get those particular questions from your endusers who are using InfoPath forms. Sometimes it appears that if you modified a formtemplate, the ‘update & save’ option in the Filler doesn’t become available. Therefore it can be very useful to display the template-version in your form. It helps you quickly determine a version issue and saves little troubleshooting time.
There are two different types of document/template versions:

– The formtemplate version number
– The uploaded form version number (versioning in SharePoint must be enabled)

Since versioning in SharePoint makes it easy to determine what version you’re using, I’ll only explain the template versioning.

To display the template version you simply choose the ‘Calculated Value’ field. Drag it in to a place were it makes sense:

01 The Calculated Value Field:

 01 Calculated Value

02 Size it, edit its properties and add the right Xpath formula:

02 Xpath Formula

substring-before( substring-after( /processing-instruction()[local-name(.) = "mso-infoPathSolution"], 'solutionVersion="'), '"')

03 Now apply this formula and look to at final result:

03 Version Result

Now it shows the template-version in which you are working.
Determine in your InfoPath Designer which version must be used and this will also give you the possibility to add a changelog to it!

Advertisements

Just an ordinary Microsoftdude...

Tagged with: , ,
Posted in Customize, InfoPath, SharePoint
One comment on “Show form version in Infopath with XPath
  1. […] Show formversion in Infopath with XPath (msfreaks.wordpress.com) […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

Blog Authors
https://paypal.me/ArjanMensch
BTC:1AiAL6QDbfNPiduYYEoy3iNS2m6UKJW2He
LTC:Lf52uAJiCRQtiegJyKqVvoh4FuvwMkHPae
ETH:0x096a12424e991696ad21cfc0e0f3749ab4f8ce1b
DSH:XnRGpf2v36F5iDT5uFaq7DsHPFF435EPmT
XMR:49UCmvAYNxB3voEVbfL8KDENwcg9SE9PeY5jU8YCaHMuLXHapRmfhgHWbwaVe4vUMveKAzAiA4j8xgUi29TpKXpm3xumqCq

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 400 other followers

Blog Stats
  • 2,725,117 hits
  • An error has occurred; the feed is probably down. Try again later.
%d bloggers like this: