-
If that code is running in the event handler for a button, then e.Source is most likely directed at WorkOrderConcern.
The following would probably work:
XPathNodeIterator BodyField2 = e.Source.Select("d:WorkOrderConcernInfo/@DateUpdated", NamespaceManager);
foreach (XPathNavigator BodyField1 in ...
-
It would be a lot easier to help you if we understood the structure of your data source and exactly what you're trying to do with each value. Right now all we can do is guess.
-
I'm guessing you want something like
foreach(XPathNavigator BodyField1 in MainDataSource.CreateNavigator().Select("/dfs:myFields/dfs:dataFields/d:Buyers/d:WorkOrders/d:WorkOrderConcern/d:WorkOrderConcernInfo/@UpdatedInfo", NamespaceManager))
{
string BodySeed1 = BodyField1.Value;
// ...
-
In the C# 2003 DOM, it would be thisXDocument.DOM.selectSingleNode("//my:txtUId")
In the C# 2007 DOM, it would be MainDataSource.CreateNavigator.SelectSingleNode("//my:txtUId", NamespaceManager)
-
[quote user="dyungn"] Can anybody help me here? What is the difference entering OnAfterChange when inserting a new row as opposed to modifiying existing row.
[/quote]
The difference is the position of e.Source. You can surround the row number calculation in a conditional statement like ...
-
Though it would be slightly tricky, there is a way to do what you describe. Before I get into that, can you show us the full XPath corresponding to these lines (click the show XPath checkbox in InfoPath) as they don't mean much in this state:
prodID = @ITEMNMBR[@ITEMDESC = prodName]
prodName = @ITEMDESC[@ITEMNMBR = prodID]
-
I'm afraid I can't see any message there.
-
IP 2003 has the ability to save templates as source files. It is in the File menu of Design mode. You can also extract the file from Windows explorer by changing the file's extension to .CAB
Please try the attached form. It has the rule you described.
-
In the button properties, please change the dropdown box from "Submit" to "Rules and Custom Code" and then set up the rules.
-
If you are referring to accessing a form's fields from within the form's code, this should help:
http://www.infopathdev.com/forums/p/10197/36297.aspx#36297
If you are just referring to reading data from an XML file, I suggest you read up on the System.Xml.XmlDocument ...