2. In your FormCode utilize the following code (C#):
XPathNavigator myField = this.MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:fieldName", NamespaceManager);
Where "myField" can be any variable name you'd like (I choose to call it the same as the name on the InfoPath form; and where "/my:myFields/my:fieldName" is the copied XPath from your clipboard (from Step 1).
You can now access that field like so:
string fooBar = fieldName.value
No comments:
Post a Comment