How to Use the Qdabra Modify PI Tool for InfoPath - Mel Balsamo
in

InfoPath Dev

This Blog

Syndication

Mel Balsamo

How to Use the Qdabra Modify PI Tool for InfoPath

Scenario

When you have moved or renamed an InfoPath form template (XSN), the associated XML files become orphaned from their associated template. You will get an error message when you open an XML file because the associated template cannot be located.

Value Proposition

The Qdabra Modify PI Tool for InfoPath (QdModifyPI) modifies the InfoPath processing instruction ("HREF") attribute of an XML file to point to the new template's location.

Requirements

  • Microsoft .NET Framework 2.0 or higher
    Note: If the tool detects that your machine does not have the latest Microsoft .NET Framework, the tool will install it for you.

Installation Instructions

1.       Extract the contents of the package installer in a local directory on your machine.

2.       Run the setup.exe file and as an Administrator - this will ensure that you will have the necessary permissions to use the tool.

3.       Follow the on-screen instructions in the installation wizard to install the tool.

Usage

A. Single XML File

You may modify the processing instructions, i.e. "relink" XMLs one-by-one. This is useful if you do not intend to relink all of your XMLs. When you install the tool, it adds a right-click menu option.

1.       In Windows Explorer, right-click on an XML file and select Modify InfoPath PI from the menu.

 

2.       The Modify InfoPath PI tool will launch, showing the current PI of the selected XML file.

a.        Enter a new PI - that is, the location of the new form template (XSN) which you wish to associate your XML file with.

b.       (Optional) Check the box to open the XML file in InfoPath after modifying its PI.

c.        Click OK when done.

 

If you have checked the box shown in the image above, the modified XML will open in InfoPath. Otherwise, you can manually open the file at any time.

B. Multiple XML Files

This method assumes that you have multiple XML files stored in a directory. Note that the directory should not contain file of types other than XML. Also note that all these files should have the same PI (i.e. they all point to the same location where the associated form template is stored).

1.       Launch Modify InfoPath PI.exe from the installation folder. (By default, it is installed in C:\Program Files\AutonomySystems\Modify InfoPath PI.)

2.       In the Target Folder field, enter the local path where you store your XMLs, e.g. C:\InfoPathForms. You can also click on the folder icon and browse to the local folder.

3.       In the New PI field, enter the full path to the new location of your form template which you wish to associate with your XML files.

 

4.       Click OK when done.

5.       To verify that the modification succeeded, open any of the XML files in the selected directory. The file should open with the new InfoPath form template specified. You can also open any XML file in a text editor such as Notepad and verify that the HREF has changed.

 

Migrating XMLs from One SharePoint to Another

When InfoPath form files are saved to a SharePoint Form Library, SharePoint creates hard-coded references to the form template in the team site where the forms are being saved.  If the SharePoint Form Library is moved to a new location, the references in the InfoPath form files will continue to point to the old location, even after they've been moved into the new Form Library. You can update these references in the form files manually or by using a tool.

The steps below assume that you already have two existing SharePoint libraries, and that you have published your form template (XSN) to both locations.

Export: Copy the XMLs from Form Library A

Export the XMLs by copying them from the first form library (we'll call this Form Library A) to your local machine.

1.       Open Form Library A in Internet Explorer.

2.       Click on the All Documents drop-down > Explorer View - this will allow you to drag & drop and/or copy all the XMLs at once.

 

3.       Highlight to select all the existing XMLs and drag them into a folder in your local machine, e.g. D:\SampleForms.

Use the Tool to Modify the XMLs

Modify the Processing Instructions of the XMLs using the tool to point them to the form template published in the second form library (we'll call this Form Library B).

4.       Launch the tool from the installation folder. (By default, it is installed in C:\Program Files\AutonomySystems\Modify InfoPath PI\Modify InfoPath PI.exe.)

5.       In the Target Folder field, enter the local path where you placed your XMLs, e.g. D:\SampleForms. You can also click on the folder icon and browse to the local folder.

6.       In the New PI field, enter the full path to the form template that you published in Form Library B.

 

7.       Click OK.

The tool will close after successfully modifying PIs of the XMLs in the folder.

Import: Upload the XMLs to the New Location

When done modifying the XMLs and they're now pointing to the new location, you can then upload them to Form Library B.

8.       Open Form Library B in Internet Explorer.

9.       Click on the down-arrow key next to Upload and then select Upload Multiple Documents.

 

10.    Drag the updated XMLs from your local folder and drop them into the SharePoint window.

 

11.    Click OK, and then click Done.

Your forms should now open with the template in the new SharePoint location.

 

Purchase the Qdabra Modify PI Tool for InfoPath here.

Comments

No Comments
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.