Question

This question will serve as an FAQ. (Hope it proves to be useful!)

I have found that re-publishing a form template to the SharePoint site each time I desire to make a change to while testing can take an extensive amount of time. Furthermore, I do not like to mess around with the production version of my template if at all possible. Also, it might be nice to use a form that has already been filled out to test the template. A prefilled form often has a much more complex structure and allows me to better test my rules and XPath expressions.

I wanted to find a way to modify the form locally on my system but I always got the pesky 'This Form cannot be opened because it requires domain permission level and it currently has restricted permission." Error.

Finally figured it out!

Was it helpful?

Solution

Revising this answer for 2 solutions... Solution A and B. Solution A is the official way to this, Solution B was my misadventure that prompted this post.

Solution A)

  1. Click on "File > Form Options"
  2. Click on "Preview" in the left hand list box.
  3. Click "Browse" and select the target XML file that you would like to preview the form with.

Much easier than my initial solution which works... but clearly wasn't intended for use by Microsoft. See Solution B below.

Solution B)

The following steps can be taken to tie a pre-existing InfoPath XML form (an already filled out form) to a local copy of a template file that is housed on the C drive:

  1. Open the desired form library in Explorer view; navigate into the "forms" folder
  2. Save the template.xsn file to a location on your C drive
  3. Copy over one of the .xml forms that belongs to that template
  4. Change the extension of the local template.xsn file to .xsf (the one on the C drive)
  5. Open the copied .xml file directly in a text editor (like Notepad++)
  6. Change the href= line at the very top to the path to the template.xsf as below:
    • href="file:///C:\Users\bob.smith\Documents\SharePoint\InfoPath\template test\template.xsf"
  7. Save the raw XML
  8. Open the form - it should load and reference the local version of the template.

When you would like to make changes to the template perform the following steps:

  1. Change template.xsf back to template.xsn on the local template
  2. Right click on `template.xsn' and choose "Design"
  3. When done with changes, save the file and close
  4. Next right click, rename and change the name to template.xsf again.

Now you will easily be able to modify the template and test it with a pre-exsisting form.

PLEASE NOTE

  1. If the form template is changed and republished, the local copies of the pre-existing forms will no longer open using the new .XSF version of the template. I.E download a new copy of the template and a new copy of the XML file if things start acting strangely. Repeat the steps laid out above and you will be back in business.
  2. Do not use the "Save As" feature in InfoPath when trying to create a modified copy of the template that is being tested locally. Always copy the "template.xsn" file in Windows Explorer and name it something else. The template that is currently being tested will always have to be named "template.xsn".

In my case I had a form with complex rules that were causing an "Exceeded the maximum limit" calculation error. By doing this I could quickly spool off as many copies of my template as I liked and modify them in any way I see fit. I started by deleting half of the data nodes in the form and then checked to see if that fixed the rule problem etc.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top