Showing 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
  1. Add a new field (say VersionNumber) to main data source.
  2. Right click on Version number and select properties.
  3. Click on infopath1.gif button next to Value text box. This will open “Insert Formula” dialog box.
  4. Type “ substring-before(substring-after(processing-instruction()[local-name(.) = "mso-infoPathSolution"], 'solutionVersion="'), '"') ” in the Insert Formula window.

    Below is a screen shot:

    infopath.gif
  5. Click OK button to close Insert Formula dialog box and then properties windows.
  6. Drag field “VersionNumber” to your form and place it in a suitable place (say bottom-right corner) and make it read only.
  7. Now publish and upload to hosting environment.
  8. 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.
Ebook Download
View all
Learn
View all