Infopath Error Message

R

Rick

I have an infopath template file that I decompress made changes to and
recompress. It is published to a Sharepoint site. within the form it is
querying the Sharepoint "Contacts" list.
When I open the form within Sharepoint, I get the following error:
"Server was unable to process request. --> View name '' not found in list
Contacts."

I took a copy of the template.xsn file from the Sharepoint site onto my
local machine and without making any changes I am able to open the form and
run it without any problems.
The infopath error messages are of little help.

Does anyone have any suggestions as to what may cause this error? Or Can
anyone point me to some documentation on Infopath Error messages and what
they actually mean?

Thanks in Advance,
Rick
 
R

Renee in Juneau

Okay, this is just a stab in the dark, but FWIW ---

It sounds like something you did is making Sharepoint try to display
the form using a Sharepoint view that doesn't exist (eg: the view's
name is ''). Perhaps its a view of the Contacts list that doesn't
exist, perhaps its a list view of the form lib that doesn't exist.
Perhaps you have a carriage return in your xml form's header or
metadata that shouldn't be there. You aren't getting the error on your
local machine because your local machine is ignoring the Sharepoint
specific instructions.

If I were trying to debug this (and admittedly, I'm just an
enthusiastic newbie in both Infopath and Sharepoint), I would first
try recompressing the XSN with the original template to make sure that
its actually the template changes that are the problem and not some
other error that's crept into package. Having confirmed that, I would
start ripping out the different changes I've made to the template (and
recompressing then testing it) until I had it working again and then
work from there at figuring out exactly what's breaking.

Good Luck....And when you figure it out, post back a summary here,
please?
 
R

Rick

Thanks. I spent most of the day yesterday looking at the template files
trying to find the difference in one that works and one that doesn't. And
not really noticing the obvious, I am fairly new to XML, Infopath and
Sharepoint. What I did discover this moring was in the "template.xml" file,
whitespace seemed to be added after saving the file with the XmlDocument
object.

The fix was to use:
XMLDocumentObject.PreserveWhitespace = True

Which I did add yesteday when trying to figure this out, but I am working
against a Virtual PC and it seems that my .dll's where out of wack. So after
adding the above code back in my code and rebuilding the .Net project. All
seems to work.

FYI:

The template.xml file that didn't work look something like this:
<tns:wizardMode>false</tns:wizardMode>
<tns:listPath>contacts</tns:listPath>
<tns:viewName>
</tns:viewName>

The template.xml file that worked looked like this:
<tns:wizardMode>false</tns:wizardMode>
<tns:listPath>contacts</tns:listPath>
<tns:viewName></tns:viewName>
 
R

Renee in Juneau

Good to know...Thanks!

Thanks. I spent most of the day yesterday looking at the template files
trying to find the difference in one that works and one that doesn't. And
not really noticing the obvious, I am fairly new to XML, Infopath and
Sharepoint. What I did discover this moring was in the "template.xml" file,
whitespace seemed to be added after saving the file with the XmlDocument
object.

The fix was to use:
XMLDocumentObject.PreserveWhitespace = True

Which I did add yesteday when trying to figure this out, but I am working
against a Virtual PC and it seems that my .dll's where out of wack. So after
adding the above code back in my code and rebuilding the .Net project. All
seems to work.

FYI:

The template.xml file that didn't work look something like this:
<tns:wizardMode>false</tns:wizardMode>
<tns:listPath>contacts</tns:listPath>
<tns:viewName>
</tns:viewName>

The template.xml file that worked looked like this:
<tns:wizardMode>false</tns:wizardMode>
<tns:listPath>contacts</tns:listPath>
<tns:viewName></tns:viewName>
 
Top