Showing posts with label infopath. Show all posts
Showing posts with label infopath. Show all posts

Sunday, February 15, 2015

Upgrading instances of a form - InfoPath 2010 administrator-approved templates

If you have an administrator approved template for InfoPath in SharePoint, you will notice that whenever you upload a new form template via Central Administrator, all existing instances of the form would not be automatically upgraded.

If there are specific scenarios where you need to have existing forms upgraded, there is a very simple workaround.
1. Take note of the most recent uploaded version of the form in Central Administration - General Application Settings - Manage form templates.
2. Download a copy of the form instance.
3. Open the .xml file in a plain text editor.
4. Modify the version in the form's solutionVersion attribute near the header.
 <?mso-infoPathSolution name="urn:schemas-microsoft-com:office:infopath:Your-Form-Name:-myXSD-2014-01-27T23-22-27" solutionVersion="1.0.0.155" productVersion="14.0.0.0" PIVersion="1.0.0.0" href="http://Your-Site/Your-Form-Name.xsn"?>  
5. Save and re-upload the .xml with the same name.

Monday, May 5, 2014

SharePoint InfoPath 2010: C# populate rows in a repeating table

I had an InfoPath form where I needed to have 2 views. In the 2nd view, some information in the repeating table would be automatically populated based on the information entered in the first view.

Initially I wanted to use a rule-only approach but it ended up being too cumbersome; I had to resort to code :(

I will use a time card with date range as an example here. The repeating table will have one row for each day within the date range I have selected.

Sunday, March 2, 2014

C# Update InfoPath by passing in the XPath

C# code snippet to update the InfoPath XML file in a SharePoint library.

Sample parameters:
websiteUrl: http://sharepoint
library Name: InfoPath Library
list Id: 1
xpath: /my:myFields/my:Employees/my:Employee[my:ID='123']/my:Location
value: San Jose

What it does:
In the repeating group Employees, locate the employee whose ID is 123, and update the location to San Jose.

Related Posts Plugin for WordPress, Blogger...