TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Showing Version number in InfoPath
Manoj Acharya
Dec 12, 2011
6.9
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
In this blog you will learn how to show version number in InfoPath.
Overview
Showing version number is required while InfoPath forms are being deployed into multiple environments. InfoPath upgrades its own version number each time we publish it. Tracking this version number is vital to make sure that all environments are hosting the latest one. Below is a how to snapshot of that.
Steps
Add a new field (say VersionNumber) to main data source.
Right click on Version number and select properties.
Click on
button next to Value text box. This will open “Insert Formula” dialog box.
Type “ substring-before(substring-after(processing-instruction()[local-name(.) = "mso-infoPathSolution"], 'solutionVersion="'), '"') ” in the Insert Formula window.
Below is a screen shot:
Click OK button to close Insert Formula dialog box and then properties windows.
Drag field “VersionNumber” to your form and place it in a suitable place (say bottom-right corner) and make it read only.
Now publish and upload to hosting environment.
On opening the form it should show you latest version number.
Conclusion
One can compare version number in different environments and can easily find out if a particular environment is hosting a lower version of the form. This is purely meant for development purpose only and hence may not bear any business significance. So one may take out the control before pushing it into prod environment.
Showing Version number in InfoPath
Next Recommended Reading
Difference between various .NET Framework versions