Infopath location of published forms

J

Javier

First of all, my excuses if this query have been answered before, but I have
not found any previous post about it.

The question should be very obvious, but I can't discover what is Infopath
doing. I have created an Infopath form and I have published it on a local
folder (c:\forms\myform.xsn), filling some specific forms using this form
and different data (form1.xml, form2.xml, ..., formN.xml).

After that I have deleted the main form (do not worry, I have a copy stored
in my USB memory ;) ) and I have discovered that if I delete the main form
(myform.xsn) I am able to reopen ALL the other forms with data I have filled
and modify this data and save it again.

Therefore, my question is double:

a) Where store Infopath published forms (I thought they read the file in the
original folder every time I filled a form, but it is not be the real thing,
because it opens fine without the main form being in the local disk).

b) The real question behind my "testing": is it possible to replace one form
with another form with the same name but different formatting and appearance
(using the same fields)? For example: I have a "myform.xsn" form with a blue
header and a "myform.xsn" form with a red header (they are stored in my USB
memory in different folders). The published form is the blue header one in
the "c:\forms" folder. What happens if I replace it with the red header one
in my USB memory? My testing says that Infopath shows the form with the blue
header, but this form is not available in my machine (and I think ".xml"
files did not store forms' format and appearance data).

Thanks in advance for all your attention.

--Javier
 
J

Javier

Thanks, Anton, for your response. But now the problem/question is: Where is
the cache located?

I have found a previous post in this group mentioning a path like

C:\Documents and Settings\UserName\Local Settings\Application
Data\Microsoft\InfoPath\FormCache1\AFE78D37.FB6\f6480f1582b86cc$85b4477cfa65694f

But, in my case, in "C:\Documents and Settings\UserName\Local
Settings\Application Data\Microsoft\" only appears a "CD Burning" folder.

Thanks, again.

--Javier
 
R

Renee in Juneau

Yet another "not a guru" answer, but....

First of all, I think the answer you're looking for might involve
creating different views (and possibly user roles to determine which
view a user has) within one form rather than using different forms
altogether.



As for what's going on when you open the xml, I found this response on
InfopathFAQ (from question INFOPATHFAQ040106, but also check out
INFOPATHFAQ010133):

1. The first time a form is opened on a user's system, InfoPath will
cache the form files so the user can then work offline. After that,
each time the form is opened Infopath will check the original location
to see if the template has been updated. If the original location is
not available, InfoPath will continue to use the cached files. If it's
possible for the user to open the form once while online, whether from
a shared folder, a Web server, or a SharePoint form library, they can
then fill out the form without having to reconnect.

2. When you publish a form, you select where you want to publish the
form (file share, web server, SharePoint site). Then you specify a
location and a name. Finally, you confirm the location. If you clear
the path listed in the confirmation dialog, no location will be
stamped on the form template and you'll avoid this error. This isn't a
great solution, though, because if the forms your users fill out are
not located in the same directory as the form template, you won't be
able to open them (you'll get a missing template error). However, it
will let you email the XSN file.

3. InfoPath does support a different kind of reference to maintain the
link between form and template; a URN-based reference. Instead of
stamping a URL into the form pointing to the location of the form
template, InfoPath can instead stamp a URN into the form, which points
to a Registry key which in turn points to the form template. A
URN-based form must be installed on the users machine through a custom
install package (which can be as simple as a batch file or as complex
as an InstallShield solution), which means you could email it to your
users and they could install it wherever they liked, without ever
being "online". Because the URN provides a level of indirection in the
form/template association, your users could have the form template
installed in one location while you have it installed in another
location and InfoPath would still be able to correctly resolve the
reference.



So, it appears the path to the form is stored in the various XML file
headers/metadata. If you open the data XML file in notepad, you'll see
something like this:

<?xml version="1.0" encoding="UTF-8"?>
<?mso-infoPathSolution solutionVersion="1.0.0.51"
productVersion="11.0.6357" PIVersion="1.0.0.0"
href="file:///\\cbjfiles\shared\MIS\scratch\AID\AID8.xsn"
name="urn:schemas-microsoft-com:eek:ffice:infopath:AID8:-myXSD-2005-05-10T19-11-26"
?>
<?mso-application progid="InfoPath.Document"?>
<?mso-infoPath-file-attachment-present?>

Opening template.xml from the XSN gives you this:

<?xml version="1.0" encoding="UTF-8"?>
<?mso-infoPathSolution
name="urn:schemas-microsoft-com:eek:ffice:infopath:AID:-myXSD-2005-05-10T19-11-26"
href="manifest.xsf" solutionVersion="1.0.0.51"
productVersion="11.0.6357" PIVersion="1.0.0.0" ?>
<?mso-application progid="InfoPath.Document"?>
<?mso-infoPath-file-attachment-present?>

And the manifest.xsf, also from the XSN:

<xsf:xDocumentClass trustSetting="automatic"
solutionVersion="1.0.0.51" productVersion="11.0.6357"
solutionFormatVersion="1.100.0.0" publishUrl="C:\Documents and
Settings\All Users\Desktop\Sharepoint\AID\manifest.xsf"
name="urn:schemas-microsoft-com:eek:ffice:infopath:AID:-myXSD-2005-05-10T19-11-26"


but also perhaps this knowledgebase article can help:
http://support.microsoft.com/default.aspx?scid=kb;en-us;827001
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top