Hi,
I found this code snippet to insert a node when click the button (for instance Submit button) for IP 2007:
Please try the following codes in InfoPath 2007:
public void CTRL6_5_Clicked(object sender, ClickedEventArgs e)
{
// Write your code here.
XPathNavigator ContextNode =
this.MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:group1/my:group2",
NamespaceManager);
this.CurrentView.SelectNodes(ContextNode);
this.CurrentView.ExecuteAction(ActionType.XCollectionInsert,
"group2_1");
}
I will see if I can find out a way to do it by rule.
Stephanie
Stephanie
Stephanie Cantwell / Test ManagerQdabra® Software / Streamline data gathering to turn process into knowledge