InfoPath with Isolated Storage

M

Murali

Hello,
I am working on a InfoPath Solution with Isolated Storage.
I ran into the following issue. Any help will be appreciated.

I created data Connections of sharepoint list and then create CACHE_OBJECT's
of the result. I search the data object based on the drop down selection for
Discipline, Contractor Name and Purchase Order.

If the computer is online, I point to DataObject and run my XPath as shown
below.

doc = (IXMLDOMDocument2)XDocument.DataObjects["ContractInformation"].DOM;
doc.setProperty(Namespace);
doc.selectNodes("/dfs:myFields/dfs:dataFields/dfs:ContractInformation[@Discipline='"+
Discipline +"'and @ContractorName='"+ ContractorName +"'and
@PurchaseOrder='"+ PurchaseOrder +"']");

This works perfectly fine and I get the result which I append to an another
view as a search result.

2. If the computer is offline. This is the code I run.
string xml = _cache[CACHED_OBJECT_PREFIX + "ContractInformation" + ".xml"];
dataObject.DOM.loadXML( xml );
doc = (IXMLDOMDocument2)XDocument.CreateDOM();
doc.loadXML(xml);
doc.setProperty ("SelectionNamespaces",
"xmlns:dfs=\"http://schemas.microsoft.com/office/infopath/2003/dataFormSolution\"");
When I run the doc.selectedNodes (XPath) on this I do not get any error but
the search does not return any result. xml is populated on both cases and is
the same. Kindly let me know where I am going wrong.
Thanks for your help in advance.
Murali.
 

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