-
Hi ZhenYuan,
try this:
XPathNavigator test = Me.DataSources["DATACONNECTION"].CreateNavigator();
test.SelectSingleNode("dfs:myFields",Me.NamespaceManager).DeleteSelf();
-
I mean design a new form template with a main datasource who combine (you can make 5 childs nodes) all the 5 mains datasources of the differents templates . He make this template with Infopath. After that he build his xml with his code to match to this new template. I never do that, but I think it can work.
-
[quote user="Jimmy"]But what makes you think that this would be faster than using rules?[/quote]
I think it was my fault. I say that on a context that he have a lot of field to reinitialize, so instead of use a rules for each fiel.d I suggest to use code to replace the parent node with a empty reference node in this case using code is ...
-
Hi, I convert it to j-Script:
var value = XDocument.DOM.selectSingleNode("/my:myFields/my:r").xml
if(value.indexOf("Bronze")!=-1)
XDocument.DOM.selectSingleNode("/my:myFields/my:t/my:t2").text="Low";
if(value.indexOf("Silver")!=-1)
...
-
Hi mahmoudhamdy, Why you don't design a new Infopath form template with your 5 files template. If you build a xml file that match with that template, I think it can works.
-
Hi Anthony, I suggest you to use C# 2003 on "form option" go to "programming" and select C# (compatible 2003). After that you have to add an event handler on the parent node of your repeating node in my template it's"my:r"(right click on the field on the main data source, select ...
-
Hi, to do that , you have to set caption property.
-You can add a global variable: int Caption=0;
-add an event on context change and set some code here an example :
if(caption<1)
{
this.Application.ActiveWindow.Caption = "YOUR CAPTION";
caption++;
}
-
Hi Anthony, it seems that rules doesn't apply if we delete/add a new row. I think you need to add some codes. Just ask me if you need some help.
-
For your Signature, if you have add some new field on your form template by default your xml is updated and your new field is added ... and your signature become invalid. You can configure your form to not update the existing form, on form option go to versionning and set "on version update" to "do nothing", the old xml ...
-
Hi Misterchris, I did the same thing remove all columns, and recreate them.I don't know exactly, how it happens, but I use a dev environment too, If I publish the same form to prod/dev the column ID is not the same and Infopath loose is binding.