changes on infopath template

R

Rahman Hadi

Hi All,
When I have to add some nodes on data source template(deployment phase), I
always got problem after re-publish it on sharepoint server. The problem is
happened while user try to open the old version files which is created with
the old template. Event I add the node at the last position on the xml
tree(data source), it still can work. It's caused the control that's bind to
the new node is "DISABLED".
So to resolve this problem, I use "VS.net office development" and modify the
code while the "OnLoad" method is executing, then add node to
"thisXDocument.DOM" object and use "createXMLNode" method. It just can done
by the programmer hand right? ..:)
So, Is it the best thing to resolve the problem ?
If it's true, actually miscrosoft must think about that, cause infopath's
user is not always programmer? ..:)
and regarding the company always do some deployment and changes in bussiness
flow. Then infopath user can keep the old data and can modify the template
freely.

Please advice ...

Thanks,
Rahman H
 
R

Rahman Hadi

Hi Shailaja,
yes i'm trying change the old data xml file which is synchronize with the
new form template schema. After I tried, it just upgrade the form template in
my local computer and it's not upgrade my old data .xml file with the new
node. the new field control data is still "DISABLED". and there was no change
in the old xml file.

any other suggestion?

thanks,
 
R

Rahman Hadi

I work aroud with this. finally i've just add some lines code to add new node
manually while loading form.
try this one:

if(thisDOM.selectSingleNode"/my:From1/my:NewNode")==null){
IXMLDOMNode newNode = null;
string csURI = thisDOM.documentElement.namespaceURI;
newNode = thisDOM.createNode(1,"my:NewNode",csURI);
newNode.nodeTypedValue = String.Empty;
thisDOM.selectSingleNode"/my:From1/my:NewNode").appendChild(newNode);
}
 

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